AmqpMessage

Represents an AMQP message.

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

Note that the body is retrieved using body* method depending on the expected type.

package

Default

Methods

__construct

__construct() 

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</code> status.

accepted() : $this

Response

$this

the current {@link AmqpMessage} object

address

address() : string

Response

string

the message address, also named {@code to} field

applicationProperties

applicationProperties() : array

Response

array

the message properties as JSON object.

bodyAsBinary

bodyAsBinary() : \io\vertx\jphp\core\buffer\Buffer

Response

\io\vertx\jphp\core\buffer\Buffer

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

bodyAsBoolean

bodyAsBoolean() : boolean

Response

boolean

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

bodyAsByte

bodyAsByte() : integer

Response

integer

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

bodyAsChar

bodyAsChar() : string

Response

string

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

bodyAsDouble

bodyAsDouble() : float

Response

float

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

bodyAsFloat

bodyAsFloat() : float

Response

float

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

bodyAsInteger

bodyAsInteger() : integer

Response

integer

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

bodyAsJsonArray

bodyAsJsonArray() : array

Response

array

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

bodyAsJsonObject

bodyAsJsonObject() : array

Response

array

the JSON object contained in the body. The value must be passed as AMQP data.

bodyAsList

bodyAsList() : array

Response

array

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

bodyAsLong

bodyAsLong() : integer

Response

integer

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

bodyAsShort

bodyAsShort() : integer

Response

integer

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

bodyAsString

bodyAsString() : string

Response

string

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

bodyAsSymbol

bodyAsSymbol() : string

Response

string

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

contentEncoding

contentEncoding() : string

Response

string

contentType

contentType() : string

Response

string

correlationId

correlationId() : string

Response

string

The client-specific id that can be used to mark or identify messages between clients.

<b> create() </b>

create( $arg0 = null) : \io\vertx\jphp\amqp\AmqpMessageBuilder
static

Creates a builder to create a new @see \io\vertx\jphp\amqp\AmqpMessage copying the metadata from the passed message.

param $existing [AmqpMessage] an existing message, must not be {@code null}. create($existing)

Arguments

$arg0

AmqpMessage

Response

\io\vertx\jphp\amqp\AmqpMessageBuilder

a builder to create an {@link AmqpMessage}.

creationTime

creationTime() : integer

Response

integer

deliveryCount

deliveryCount() : integer

Response

integer

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.

expiryTime

expiryTime() : integer

Response

integer

groupId

groupId() : string

Response

string

groupSequence

groupSequence() : integer

Response

integer

id

id() : string

Response

string

the message id

isBodyNull

isBodyNull() : boolean

Response

boolean

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

isDurable() : boolean

Response

boolean

whether or not the message is durable.

isFirstAcquirer

isFirstAcquirer() : boolean

Response

boolean

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.

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as <code>modified</code>.

modified( $arg0,  $arg1) : $this

Arguments

$arg0

boolean

$arg1

boolean

Response

$this

the current {@link AmqpMessage} object

priority

priority() : integer

Response

integer

the relative message priority. Higher numbers indicate higher priority messages. Messages with higher priorities MAY be delivered before those with lower priorities.

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as <code>rejected</code>.

rejected() : $this

Response

$this

the current {@link AmqpMessage} object

When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge the incoming message as <code>released</code>.

released() : $this

Response

$this

the current {@link AmqpMessage} object

replyTo

replyTo() : string

Response

string

The address of the node to send replies to, if any.

replyToGroupId

replyToGroupId() : string

Response

string

subject

subject() : string

Response

string

ttl

ttl() : integer

Response

integer

the duration in milliseconds for which the message is to be considered "live".