RabbitMessage
faststream.rabbit.message.RabbitMessage dataclass #
RabbitMessage(raw_message, body, headers=dict(), batch_headers=list(), path=dict(), content_type=None, reply_to='', message_id=gen_cor_id(), correlation_id=gen_cor_id(), _source_type=Consume)
Bases: StreamMessage[IncomingMessage]
A message class for working with RabbitMQ messages.
This class extends StreamMessage to provide additional functionality for acknowledging, rejecting, or nack-ing RabbitMQ messages.
correlation_id class-attribute instance-attribute #
correlation_id = field(default_factory=gen_cor_id)
decode async #
ack async #
Acknowledge the RabbitMQ message.
nack async #
Negative Acknowledgment of the RabbitMQ message.
Source code in faststream/rabbit/message.py
reject async #
Reject the RabbitMQ message.