public class AMQPMessage extends Object
Constructor and Description |
---|
AMQPMessage(byte[] body,
String routingKey)
Creates an AMQP Message with given
body and routingKey , which is not mandatory and
non-immediate and has no additional properties. |
AMQPMessage(byte[] body,
String routingKey,
com.rabbitmq.client.AMQP.BasicProperties properties,
boolean mandatory,
boolean immediate)
Creates an AMQPMessage.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBody()
Returns the body of this message
|
com.rabbitmq.client.AMQP.BasicProperties |
getProperties()
Returns the additional properties to dispatch this Message with
|
String |
getRoutingKey()
Returns the Routing Key this message should be dispatched with
|
boolean |
isImmediate()
Whether to dispatch this message using the "immediate" flag
|
boolean |
isMandatory()
Whether to dispatch this message using the "mandatory" flag
|
public AMQPMessage(byte[] body, String routingKey)
body
and routingKey
, which is not mandatory and
non-immediate and has no additional properties.body
- The body of the messageroutingKey
- The routing key of the messagepublic AMQPMessage(byte[] body, String routingKey, com.rabbitmq.client.AMQP.BasicProperties properties, boolean mandatory, boolean immediate)
body
- The body of the messageroutingKey
- The routing key of the messageproperties
- The properties defining AMQP specific characteristics of the messagemandatory
- Whether the message is mandatory (i.e. at least one destination queue MUST be available)immediate
- Whether the message must be delivered immediately (i.e. a Consumer must be connected and
capable of reading the message right away).public byte[] getBody()
public String getRoutingKey()
public com.rabbitmq.client.AMQP.BasicProperties getProperties()
public boolean isMandatory()
public boolean isImmediate()
Copyright © 2010–2018. All rights reserved.