PublishedMessageBuilder
Publish a ByteArray message to exchange or queue.
Properties
When matching queue has at least one or more consumers and immediate is set to true, message is delivered to them immediately. When matching queue has zero active consumers and immediate is set to true, message is returned to publisher. When matching queue has zero active consumers and immediate is set to false, message will be delivered to the queue.
When a published message cannot be routed to any queue and mandatory is true, the message will be returned to publisher. Returned message must be handled with returnListener or returnConsumer. When a published message cannot be routed to any queue and mandatory is false, the message is discarded or republished to an alternate exchange, if any.
Additional message properties (check amqp documentation).
Name of routingKey that will be attached to the message. An exchange looks at the routingKey while deciding how the message has to be routed. When exchange parameter is empty routingKey is used as queueName.
Functions
Builds the PublishedMessage instance.