Sending Asynchronously

The message producer can send messages asynchronously by registering a completion listener to monitor message send success or failure.

Operating in a thread separate from that of the message producer, the completion listener manages the response to a successful or failed send, leaving the message producer free to perform other operations. See Create a Completion Listener for Asynchronous Sending for details.

Asynchronous sending can increase performance in certain circumstances. One of the best uses for asynchronous sending is when sending persistent messages. High level outgoing message throughput can be obtained when sending non-transacted persistent messages.

There are other considerations for the application programmer when sending messages asynchronously. These considerations are described below.