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_count
if the message was retrieved usingBasic.Get
- Return type
- property
redelivered
¶ Indicates if the message was redelivered.
Will return
None
if 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_id
property value if it is set.- Return type
- property
content_encoding
¶ Provides the
content_encoding
property value if it is set.- Return type
- property
content_type
¶ Provides the
content_type
property value if it is set.- Return type
- property
correlation_id
¶ Provides the
correlation_id
property value if it is set.- Return type
- property
delivery_mode
¶ Provides the
delivery_mode
property value if it is set.- Return type
- property
expiration
¶ Provides the
expiration
property value if it is set.- Return type
- property
headers
¶ Provides the
headers
property value if it is set.- Return type
- property
message_id
¶ Provides the
message_id
property value if it is set.- Return type
- property
message_type
¶ Provides the
message_type
property value if it is set.- Return type
- property
priority
¶ Provides the
priority
property value if it is set.- Return type
- property
reply_to
¶ Provides the
reply_to
property value if it is set.- Return type
- property
timestamp
¶ Provides the
timestamp
property value if it is set.- Return type
- property
user_id
¶ Provides the
user_id
property value if it is set.- Return type