RabbitResponse
faststream.rabbit.RabbitResponse #
RabbitResponse(
body: AioPikaSendableMessage,
*,
timeout: TimeoutType = None,
mandatory: bool = True,
immediate: bool = False,
exchange: RabbitExchange | str | None = None,
**message_options: Unpack[MessageOptions],
)
Bases: Response
Source code in faststream/rabbit/response.py
publish_options instance-attribute #
publish_options: PublishOptions = {
"mandatory": mandatory,
"immediate": immediate,
"timeout": timeout,
}
get_publish_key #
Get the key for publishing this message.
Override this method in subclasses to provide broker-specific keys. Default implementation returns None (no key).
| RETURNS | DESCRIPTION |
|---|---|
Any | None | The key for publishing, or None if this Response type doesn't use keys. |
Source code in faststream/response/response.py
as_publish_command #
as_publish_command() -> RabbitPublishCommand