Class: AmqpMessage

vertx-amqp-client-js/amqp_message~ AmqpMessage

new AmqpMessage()

Represents an AMQP message.

Reference about the different metadata can be found on AMQP message properties.

Source:

Methods

accepted() → {AmqpMessage}

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 accepted status.
Source:
Returns:
the current AmqpMessage object
Type
AmqpMessage

address() → {string}

Source:
Returns:
the message address, also named to field
Type
string

applicationProperties() → {Object}

Source:
Returns:
the message properties as JSON object.
Type
Object

bodyAsBinary() → {Buffer}

Source:
Returns:
the bytes contained in the body. The value must be passed as AMQP data.
Type
Buffer

bodyAsBoolean() → {boolean}

Source:
Returns:
the boolean value contained in the body. The value must be passed as AMQP value.
Type
boolean

bodyAsByte() → {number}

Source:
Returns:
the byte value contained in the body. The value must be passed as AMQP value.
Type
number

bodyAsChar() → {string}

Source:
Returns:
the character value contained in the body. The value must be passed as AMQP value.
Type
string

bodyAsDouble() → {number}

Source:
Returns:
the double value contained in the body. The value must be passed as AMQP value.
Type
number

bodyAsFloat() → {number}

Source:
Returns:
the float value contained in the body. The value must be passed as AMQP value.
Type
number

bodyAsInteger() → {number}

Source:
Returns:
the integer value contained in the body. The value must be passed as AMQP value.
Type
number

bodyAsJsonArray() → {Array}

Source:
Returns:
the JSON array contained in the body. The value must be passed as AMQP data.
Type
Array

bodyAsJsonObject() → {Object}

Source:
Returns:
the JSON object contained in the body. The value must be passed as AMQP data.
Type
Object

bodyAsList() → {Array.<Object>}

Source:
Returns:
the list of values contained in the body. The value must be passed as AMQP value.
Type
Array.<Object>

bodyAsLong() → {number}

Source:
Returns:
the long value contained in the body. The value must be passed as AMQP value.
Type
number

bodyAsShort() → {number}

Source:
Returns:
the short value contained in the body. The value must be passed as AMQP value.
Type
number

bodyAsString() → {string}

Source:
Returns:
the string value contained in the body. The value must be passed as AMQP value.
Type
string

bodyAsSymbol() → {string}

Source:
Returns:
the symbol value contained in the body. The value must be passed as AMQP value.
Type
string

contentEncoding() → {string}

Source:
Returns:
Type
string

contentType() → {string}

Source:
Returns:
Type
string

correlationId() → {string}

Source:
Returns:
The client-specific id that can be used to mark or identify messages between clients.
Type
string

creationTime() → {number}

Source:
Returns:
Type
number

deliveryCount() → {number}

Source:
Returns:
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.
Type
number

expiryTime() → {number}

Source:
Returns:
Type
number

groupId() → {string}

Source:
Returns:
Type
string

groupSequence() → {number}

Source:
Returns:
Type
number

id() → {string}

Source:
Returns:
the message id
Type
string

isBodyNull() → {boolean}

Source:
Returns:
whether the body is null. This method returns true is the message does not contain a body or if the message contain a null AMQP value as body.
Type
boolean

isDurable() → {boolean}

Source:
Returns:
whether or not the message is durable.
Type
boolean

isFirstAcquirer() → {boolean}

Source:
Returns:
if true, then this message has not been acquired by any other link. If false, then this message MAY have previously been acquired by another link or links.
Type
boolean

modified(didItFail, wasItDeliveredHere) → {AmqpMessage}

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as modified.
Parameters:
Name Type Description
didItFail boolean pass true to increase the failed delivery count
wasItDeliveredHere boolean pass true to prevent the re-delivery of the message
Source:
Returns:
the current AmqpMessage object
Type
AmqpMessage

priority() → {number}

Source:
Returns:
the relative message priority. Higher numbers indicate higher priority messages. Messages with higher priorities MAY be delivered before those with lower priorities.
Type
number

rejected() → {AmqpMessage}

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as rejected.
Source:
Returns:
the current AmqpMessage object
Type
AmqpMessage

released() → {AmqpMessage}

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as released.
Source:
Returns:
the current AmqpMessage object
Type
AmqpMessage

replyTo() → {string}

Source:
Returns:
The address of the node to send replies to, if any.
Type
string

replyToGroupId() → {string}

Source:
Returns:
Type
string

subject() → {string}

Source:
Returns:
Type
string

ttl() → {number}

Source:
Returns:
the duration in milliseconds for which the message is to be considered "live".
Type
number