RabbitPublishCommand
faststream.rabbit.response.RabbitPublishCommand #
RabbitPublishCommand(
message: AioPikaSendableMessage,
*,
_publish_type: PublishType,
routing_key: str = "",
exchange: RabbitExchange | None = None,
mandatory: bool = True,
immediate: bool = False,
timeout: TimeoutType = None,
**message_options: Unpack[MessageOptions],
)
Bases: PublishCommand
Source code in faststream/rabbit/response.py
publish_options instance-attribute #
publish_options: PublishOptions = {
"mandatory": mandatory,
"immediate": immediate,
}
from_cmd classmethod #
from_cmd(
cmd: Union[PublishCommand, RabbitPublishCommand],
) -> RabbitPublishCommand
Source code in faststream/rabbit/response.py
as_publish_command #
as_publish_command() -> PublishCommand
Method to transform handlers' Response result to DTO for publishers.