Message¶
The Message represents a message that was delivered via Basic.GetOk or Basic.Deliver as well as a message that was returned by RabbitMQ via Basic.Return.
- class
aiorabbit.message.Message(method)[source]¶ Represents a message received from RabbitMQ
- Parameters
method (
typing.Union[pamqp.commands.Basic.Deliver,pamqp.commands.Basic.GetOk,pamqp.commands.Basic.Return]) – For internal use only
-
__bytes__()[source]¶ Return the message body if the instance is accessed using
bytes(Message)- Return type
- property
consumer_tag¶ If the delivered via
Basic.Deliver, this provides the consumer tag it was delivered to.- Return type
- property
delivery_tag¶ If the message was delivered via
Basic.Deliver, or retrieved viaBasic.Get, this will indicate the delivery tag value, which is used when acknowledging, negative-acknowledging, or rejecting the message.- Return type
- property
message_count¶ Provides the
message_countif the message was retrieved usingBasic.Get- Return type
- property
redelivered¶ Indicates if the message was redelivered.
Will return
Noneif the message was returned viaBasic.Return.- Return type
- property
reply_code¶ If the message was returned via
Basic.Return, indicates the the error code from RabbitMQ.- Return type
- property
reply_text¶ If the message was returned via
Basic.Return, indicates the reason why.- Return type
- property
app_id¶ Provides the
app_idproperty value if it is set.- Return type
- property
content_encoding¶ Provides the
content_encodingproperty value if it is set.- Return type
- property
content_type¶ Provides the
content_typeproperty value if it is set.- Return type
- property
correlation_id¶ Provides the
correlation_idproperty value if it is set.- Return type
- property
delivery_mode¶ Provides the
delivery_modeproperty value if it is set.- Return type
- property
expiration¶ Provides the
expirationproperty value if it is set.- Return type
- property
headers¶ Provides the
headersproperty value if it is set.- Return type
- property
message_id¶ Provides the
message_idproperty value if it is set.- Return type
- property
message_type¶ Provides the
message_typeproperty value if it is set.- Return type
- property
priority¶ Provides the
priorityproperty value if it is set.- Return type
- property
reply_to¶ Provides the
reply_toproperty value if it is set.- Return type
- property
timestamp¶ Provides the
timestampproperty value if it is set.- Return type
- property
user_id¶ Provides the
user_idproperty value if it is set.- Return type