Methods used for sending messages asynchronously:
Following methods can be used for sending messages asynchronously.
- Under javax.jms.MessageProducer
- send(Message message, CompletionListener completionListener)
- send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)
- send(Destination destination, Message message, CompletionListener completionListener)
- send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)
- Under javax.jms.JMSProducer
A JMSProducer may be used to send a message asynchronously by calling the method setAsync(CompletionListener completionListener) on the JMSProducer prior to calling one of the send methods.
Configurable parameters at Connection Factory level:
- AsyncSendBatchBufferSize: Maximum amount of data (in bytes) that a JMS Session would store in un-acknowledged state for messages sent asynchronously. Attempt to exceed this size will result in either exception or publisher block as configured in PublisherBehaviourOnAsyncSendBufferOverflow parameter.
- AsyncSendCompletionWaitTimeout: Maximum amount of time (in milli seconds) that a JMS Session would wait for acknowledgement for each message sent asynchronously. CompletionListener 's onException will be invoked if no acknowledgement is received within this configured time.
- PublisherBehaviourOnAsyncSendBufferOverflow: This parameter defines the behaviour of publisher when AsyncSendBufferSize is exceeded. A new publish call can either throw an exception or block.
Overview
Content Tools
ThemeBuilder