MQSeries Programming Patterns
by Mark Perry, Manesh Balachandran, Jorge Plata, Paul Solano, Phillip Thomas
8.6. Asynchronous processing
MQSeries JMS provides the much-awaited MessageListener interface. Using the message listener facility, a client can register a listener object with a message consumer. When a message arrives for the consumer, it is delivered by to the client by calling its onMessage method.
This is an alternative to using the other approaches such as triggers, making receive or subscribe calls with the wait or polling mechanism in the application code to check for new messages or subscriptions. When using asynchronous delivery mode with the listener, the entire session associated with the message consumer is marked asynchronous. The same session cannot be used for making any explicit receive calls.
In asynchronous message delivery, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access