build_message
faststream.rabbit.test.build_message #
build_message(
message: AioPikaSendableMessage = "",
queue: Union[RabbitQueue, str] = "",
exchange: Union[RabbitExchange, str, None] = None,
*,
routing_key: str = "",
reply_to: Optional[str] = None,
**message_kwargs: Any
) -> PatchedMessage
Build a patched RabbitMQ message for testing.
PARAMETER | DESCRIPTION |
---|---|
message | The message content. TYPE: |
queue | The message queue. TYPE: |
exchange | The message exchange. TYPE: |
routing_key | The message routing key. TYPE: |
reply_to | The reply-to queue. |
**message_kwargs | Additional message arguments. TYPE: |
RETURNS | DESCRIPTION |
---|---|
PatchedMessage | A patched RabbitMQ message. TYPE: |
Source code in faststream/rabbit/test.py
Last update: 2023-11-13