AmqpMessage

Represents an AMQP message. <p> Reference about the different metadata can be found on <a href="http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-messaging-v1.0.html#type-properties">AMQP message properties</a>. <p> Note that the body is retrieved using {@code body*} method depending on the expected type.

Members

Functions

accepted
AmqpMessage accepted()

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message. It marks the message as delivered with the {@code accepted} status.

address
string address()

@return the message address, also named {@code to} field @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties">AMQP specification</a>

bodyAsBinary
byte[] bodyAsBinary()

@return the bytes contained in the body. The value must be passed as AMQP data.

bodyAsBoolean
bool bodyAsBoolean()

@return the boolean value contained in the body. The value must be passed as AMQP value.

bodyAsByte
byte bodyAsByte()

@return the byte value contained in the body. The value must be passed as AMQP value.

bodyAsChar
char bodyAsChar()

@return the character value contained in the body. The value must be passed as AMQP value.

bodyAsDouble
double bodyAsDouble()

@return the double value contained in the body. The value must be passed as AMQP value.

bodyAsFloat
float bodyAsFloat()

@return the float value contained in the body. The value must be passed as AMQP value.

bodyAsInteger
int bodyAsInteger()

@return the integer value contained in the body. The value must be passed as AMQP value.

bodyAsList
List!Object bodyAsList()

@return the list of values contained in the body. The value must be passed as AMQP value.

bodyAsLong
long bodyAsLong()

@return the long value contained in the body. The value must be passed as AMQP value.

bodyAsShort
short bodyAsShort()

@return the short value contained in the body. The value must be passed as AMQP value.

bodyAsString
string bodyAsString()

@return the string value contained in the body. The value must be passed as AMQP value.

bodyAsSymbol
string bodyAsSymbol()

@return the symbol value contained in the body. The value must be passed as AMQP value.

contentEncoding
string contentEncoding()
Undocumented in source.
contentType
string contentType()
Undocumented in source.
correlationId
string correlationId()

@return The client-specific id that can be used to mark or identify messages between clients. @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties">AMQP specification</a>

creationTime
long creationTime()
Undocumented in source.
deliveryCount
int deliveryCount()

@return the number of unsuccessful previous attempts to deliver this message. If this value is non-zero it can be taken as an indication that the delivery might be a duplicate. On first delivery, the value is zero. It is incremented upon an outcome being settled at the sender, according to rules defined for each outcome. @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-header">AMQP specification</a>

expiryTime
long expiryTime()
Undocumented in source.
groupId
string groupId()
Undocumented in source.
groupSequence
long groupSequence()
Undocumented in source.
id
string id()

@return the message id @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties">AMQP specification</a>

isBodyNull
bool isBodyNull()

@return whether the body is {@code null}. This method returns {@code true} is the message does not contain a body or if the message contain a {@code null} AMQP value as body.

isDurable
bool isDurable()

@return whether or not the message is durable. @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-header">AMQP specification</a>

isFirstAcquirer
bool isFirstAcquirer()

@return if {@code true}, then this message has not been acquired by any other link. If {@code false}, then this message MAY have previously been acquired by another link or links. @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-header">AMQP specification</a>

modified
AmqpMessage modified(bool didItFail, bool wasItDeliveredHere)

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as {@code modified}.

priority
int priority()

@return the relative message priority. Higher numbers indicate higher priority messages. Messages with higher priorities MAY be delivered before those with lower priorities. @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-header">AMQP specification</a>

rejected
AmqpMessage rejected()

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as {@code rejected}.

released
AmqpMessage released()

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as {@code released}.

replyTo
string replyTo()

@return The address of the node to send replies to, if any. @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties">AMQP specification</a>

replyToGroupId
string replyToGroupId()
Undocumented in source.
subject
string subject()

@return the JSON array contained in the body. The value must be passed as AMQP data.

ttl
long ttl()

@return the duration in milliseconds for which the message is to be considered "live". @see <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties">AMQP specification</a>

unwrap
Message unwrap()

@return the message properties as JSON object.

Static functions

create
AmqpMessageBuilder create()

@return a builder to create an {@link AmqpMessage}.

create
AmqpMessageBuilder create(AmqpMessage existing)

Creates a builder to create a new {@link AmqpMessage} copying the metadata from the passed message.

create
AmqpMessageBuilder create(Message existing)

Creates a builder to create a new {@link AmqpMessage} copying the metadata from the passed (Proton) message.

Meta