Home  > 

Class message

A mutable holder of application content.

Related: Class sender, Class receiver, Class delivery

Implementations: C, C++, Java, Python

AMQP: Message format

Basic properties and methods

PropertySummaryTypeDefault valueMutableNullable
id A unique message identifiermessage-idnull
user The identity of the user producing the messagestringnull
MethodSummaryInputsOutputs
constructor Create a new message[body]message
clear Delete the content of the message

Routing

PropertySummaryTypeDefault valueMutableNullable
to The destination addressstringnull
reply-to The address for repliesstringnull
correlation-id An identifier for matching related messagesmessage-idnull

Content

PropertySummaryTypeDefault valueMutableNullable
subject Summary informationstringnull
body The main message contentobjectnull
content-type The MIME type of the bodysymbolnull
expiry-time The absolute time past which the message should be discardedtimestampnull
creation-time The absolute time of message creationtimestampnull
inferred Determine the AMQP section type from the body typebooleanfalse

Transfer headers

Related: AMQP definition

PropertySummaryTypeDefault valueMutableNullable
durable Durability requirementbooleanfalse
priority Relative message priorityubyte4
ttl The time to livedurationnull
first-acquirer The recipient is first to acquire the messagebooleantrue
delivery-count The number of prior unsuccessful delivery attemptsuint0

Message groups

PropertySummaryTypeDefault valueMutableNullable
group-id The identifier of the group the message belongs tostringnull
group-sequence The relative position of this message within its groupuintnull
reply-to-group-id The group a reply message belongs tostringnull

Extended attributes

PropertySummaryTypeDefault valueMutableNullable
properties Application-defined message attributesmap of stringobjectnull
delivery-annotations Delivery-specific transport attributesmap of symbolobjectnull
message-annotations Message-specific transport attributesmap of symbolobjectnull

Encoding and decoding

MethodSummaryInputsOutputs
encode Encode the message to bytesbinary
decode Decode the message from bytesbytes