FakePublisher
faststream.broker.wrapper.FakePublisher #
A class to represent a fake publisher.
METHOD | DESCRIPTION |
---|---|
publish | asynchronously publishes a message with optional correlation ID and additional keyword arguments |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Initialize an object.
PARAMETER | DESCRIPTION |
---|---|
method | A callable that takes any number of arguments and returns an awaitable sendable message. |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/wrapper.py
publish async
#
publish(
message: SendableMessage,
correlation_id: Optional[str] = None,
**kwargs: Any
) -> Optional[SendableMessage]
Publish a message.
PARAMETER | DESCRIPTION |
---|---|
message | The message to be published. TYPE: |
correlation_id | Optional correlation ID for the message. |
**kwargs | Additional keyword arguments. TYPE: |
RETURNS | DESCRIPTION |
---|---|
Optional[SendableMessage] | The published message. |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/wrapper.py
Last update: 2023-11-13