Package org.acemq.amqp.transport
Class InboundDelivery
java.lang.Object
org.acemq.amqp.transport.InboundDelivery
A message handed up from the broker, still encoded.
-
Constructor Summary
ConstructorsConstructorDescriptionInboundDelivery(String queue, String exchange, String routingKey, byte[] body, @Nullable Map<String, Object> headers, @Nullable String messageId, @Nullable String contentType, boolean redelivered) InboundDelivery(String queue, String exchange, String routingKey, byte[] body, @Nullable Map<String, Object> headers, @Nullable String messageId, @Nullable String contentType, boolean redelivered, @Nullable String replyTo) -
Method Summary
-
Constructor Details
-
InboundDelivery
-
InboundDelivery
public InboundDelivery(String queue, String exchange, String routingKey, byte[] body, @Nullable Map<String, Object> headers, @Nullable String messageId, @Nullable String contentType, boolean redelivered, @Nullable String replyTo) - Parameters:
replyTo- queue the sender asked for a reply on, ornullwhen it expects none
-
-
Method Details
-
replyTo
Where the sender asked for a reply.AMQP's own
reply-toproperty, so this is set whether or not the sender used this library.- Returns:
- the reply queue, when the sender named one
-
queue
-
exchange
-
routingKey
-
body
public byte[] body() -
headers
- Returns:
- the message headers
- Implementation Requirements:
- values must be portable types only:
String,Number,Boolean, or aListorMapof those. Client libraries expose their own wrappers — the RabbitMQ client hands backLongStringrather thanString— and converting them is the transport's job. The core compares header values against ordinary Java types, and a client-specific wrapper that reaches it fails those comparisons in a way that is tedious to diagnose.
-
messageId
-
contentType
-
redelivered
public boolean redelivered()- Returns:
- the broker's redelivery flag
- Implementation Note:
- this is not the AceMQ attempt counter. A broker sets it after any recovery, including one unrelated to a handler failure, so it is a hint for operators rather than something retry policy should be built on.
-
toString
-