public class OutboundMessage extends Object
Sender
.Constructor and Description |
---|
OutboundMessage(String exchange,
String routingKey,
AMQP.BasicProperties properties,
byte[] body)
Constructs a new message which is described by the body, the target exchange and the routing key which
can be used for smart routing after the message is published to the exchange.
|
OutboundMessage(String exchange,
String routingKey,
byte[] body)
Constructs a new message which is described by the body, the target exchange and the routing key which
can be used for smart routing after the message is published to the exchange.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBody()
Defines the main body of the message in byte array form.
|
String |
getExchange()
Defines the exchange to which the message will be published.
|
AMQP.BasicProperties |
getProperties()
Defines any additional properties that will be used during the publishing of the message.
|
String |
getRoutingKey()
Defines the routing key to be used if the message has to be routed in a specific way towards a queue
|
String |
toString() |
public OutboundMessage(String exchange, String routingKey, byte[] body)
exchange
- The name of the target exchange.routingKey
- The routing key to be used if the message has to be routed in a specific way towards a queue.body
- The main body of the message.public OutboundMessage(String exchange, String routingKey, @Nullable AMQP.BasicProperties properties, byte[] body)
exchange
- The name of the target exchange.routingKey
- The routing key to be used if the message has to be routed in a specific way towards a queue.properties
- AMQP compatible properties that will be used during the publishing of the message.body
- The main body of the message.public String getExchange()
public String getRoutingKey()
@Nullable public AMQP.BasicProperties getProperties()
public byte[] getBody()