AsyncPublisherProtocol
faststream.broker.types.AsyncPublisherProtocol #
Bases: Protocol
A protocol for an asynchronous publisher.
METHOD | DESCRIPTION |
---|---|
publish | SendableMessage, correlation_id: Optional[str] = None, **kwargs: Any) -> Optional[SendableMessage]: Publishes a message asynchronously. Args: message: The message to be published. correlation_id: The correlation ID for the message (optional). **kwargs: Additional keyword arguments. Returns: The published message (optional). |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
publish async
#
publish(
message: SendableMessage,
correlation_id: Optional[str] = None,
**kwargs: Any
) -> Optional[SendableMessage]
Publishes 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, or None if the message was not published. |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)