LogicPublisher
faststream.rabbit.publisher.LogicPublisher dataclass
#
Bases: ABCPublisher[IncomingMessage]
A class to publish messages for logic processing.
METHOD | DESCRIPTION |
---|---|
publish | Publishes a message for logic processing. |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
calls class-attribute
instance-attribute
#
exchange class-attribute
instance-attribute
#
message_kwargs class-attribute
instance-attribute
#
mock class-attribute
instance-attribute
#
get_payloads #
Source code in faststream/broker/publisher.py
name #
publish async
#
publish(
message: AioPikaSendableMessage = "",
*,
rpc: bool = False,
rpc_timeout: Optional[float] = 30.0,
raise_timeout: bool = False,
correlation_id: Optional[str] = None,
priority: Optional[int] = None,
**message_kwargs: Any
) -> Union[
aiormq.abc.ConfirmationFrameType, SendableMessage
]
Publish a message.
PARAMETER | DESCRIPTION |
---|---|
message | The message to be published. TYPE: |
rpc | Whether the message is for RPC (Remote Procedure Call). TYPE: |
rpc_timeout | Timeout for RPC. |
raise_timeout | Whether to raise an exception if timeout occurs. TYPE: |
correlation_id | Correlation ID for the message. |
**message_kwargs | Additional keyword arguments for the message. TYPE: |
RETURNS | DESCRIPTION |
---|---|
Union[ConfirmationFrameType, SendableMessage] | ConfirmationFrameType or SendableMessage: The result of the publish operation. |
RAISES | DESCRIPTION |
---|---|
AssertionError | If |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)