basicPublish
Publish a ByteArray message to exchange or queue.
Return
DeliveryTag waiting for message write to the broker. DeliveryTag is 0 when channel is not in confirm mode. DeliveryTag is 0 (monotonically increasing) when channel is in confirm mode.
Parameters
Message payload that can be read from ByteArray.
Name of exchange on which the message is published. Can be empty.
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.
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.
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.
Additional message properties (check amqp documentation).