public interface AmqpMessage
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.
Modifier and Type | Method and Description |
---|---|
AmqpMessage |
accepted()
When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge
the incoming message.
|
String |
address() |
JsonObject |
applicationProperties() |
Buffer |
bodyAsBinary() |
boolean |
bodyAsBoolean() |
byte |
bodyAsByte() |
char |
bodyAsChar() |
double |
bodyAsDouble() |
float |
bodyAsFloat() |
int |
bodyAsInteger() |
JsonArray |
bodyAsJsonArray() |
JsonObject |
bodyAsJsonObject() |
<T> List<T> |
bodyAsList() |
long |
bodyAsLong() |
<K,V> Map<K,V> |
bodyAsMap() |
short |
bodyAsShort() |
String |
bodyAsString() |
String |
bodyAsSymbol() |
java.time.Instant |
bodyAsTimestamp() |
UUID |
bodyAsUUID() |
String |
contentEncoding() |
String |
contentType() |
String |
correlationId() |
static AmqpMessageBuilder |
create() |
static AmqpMessageBuilder |
create(AmqpMessage existing)
Creates a builder to create a new
AmqpMessage copying the metadata from the passed message. |
static AmqpMessageBuilder |
create(org.apache.qpid.proton.message.Message existing)
Creates a builder to create a new
AmqpMessage copying the metadata from the passed (Proton) message. |
long |
creationTime() |
int |
deliveryCount() |
long |
expiryTime() |
String |
groupId() |
long |
groupSequence() |
String |
id() |
boolean |
isBodyNull() |
boolean |
isDurable() |
boolean |
isFirstAcquirer() |
AmqpMessage |
modified(boolean deliveryFailed,
boolean undeliverableHere)
When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge
the incoming message as
modified . |
int |
priority() |
AmqpMessage |
rejected()
When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge
the incoming message as
rejected . |
AmqpMessage |
released()
When receiving a message, and when auto-acknowledgement is disabled, this method is used to acknowledge
the incoming message as
released . |
String |
replyTo() |
String |
replyToGroupId() |
String |
subject() |
long |
ttl() |
org.apache.qpid.proton.message.Message |
unwrap() |
static AmqpMessageBuilder create()
AmqpMessage
.static AmqpMessageBuilder create(AmqpMessage existing)
AmqpMessage
copying the metadata from the passed message.existing
- an existing message, must not be null
.AmqpMessage
.static AmqpMessageBuilder create(org.apache.qpid.proton.message.Message existing)
AmqpMessage
copying the metadata from the passed (Proton) message.existing
- an existing (Proton) message, must not be null
.AmqpMessage
.boolean isDurable()
boolean isFirstAcquirer()
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.int priority()
int deliveryCount()
long ttl()
String id()
String address()
to
fieldString replyTo()
String correlationId()
boolean isBodyNull()
null
. This method returns true
is the message does not contain a body or
if the message contain a null
AMQP value as body.boolean bodyAsBoolean()
byte bodyAsByte()
short bodyAsShort()
int bodyAsInteger()
long bodyAsLong()
float bodyAsFloat()
double bodyAsDouble()
char bodyAsChar()
java.time.Instant bodyAsTimestamp()
UUID bodyAsUUID()
Buffer bodyAsBinary()
String bodyAsString()
String bodyAsSymbol()
<T> List<T> bodyAsList()
<K,V> Map<K,V> bodyAsMap()
JsonObject bodyAsJsonObject()
JsonArray bodyAsJsonArray()
String subject()
String contentType()
String contentEncoding()
long expiryTime()
long creationTime()
String groupId()
String replyToGroupId()
long groupSequence()
JsonObject applicationProperties()
org.apache.qpid.proton.message.Message unwrap()
AmqpMessage accepted()
accepted
status.AmqpMessage
objectIllegalStateException
- is the current message is not a received message.AmqpMessage rejected()
rejected
.AmqpMessage
objectIllegalStateException
- is the current message is not a received message.AmqpMessage released()
released
.AmqpMessage
objectIllegalStateException
- is the current message is not a received message.AmqpMessage modified(boolean deliveryFailed, boolean undeliverableHere)
modified
.deliveryFailed
- pass true
to increase the failed delivery countundeliverableHere
- pass true
to prevent re-delivery of this message to the same consumerAmqpMessage
objectIllegalStateException
- is the current message is not a received message.Copyright © 2023 Eclipse. All rights reserved.