WebSphere MQ Adapter 6.5 | webMethods WebSphere MQ Adapter Documentation | webMethods WebSphere MQ Adapter Installation and User’s Guide Documentation | About the WebSphere MQ Adapter | Adapter Notifications | Listener Transactionality | Runtime Processing of Listeners and Notifications | Runtime Processing of Listeners and Synchronous Listener Notifications
 
Runtime Processing of Listeners and Synchronous Listener Notifications
The following diagram and steps illustrate what happens when a listener retrieves a message from the queue and invokes a synchronous listener notification.
Step
Description
1
The listener retrieves a connection from the service's associated connection pool. The connection uses the WebSphere MQ libraries to monitor and listen for messages on a queue.
2
The listener monitors the queue for messages.
3
When a message appears, the listener retrieves the message from the queue. The listener passes the message to the synchronous notification.
4
The synchronous notification compares the message's MQMD Header fields against the Filter Criteria fields specified for the notification. If all specified criteria matches between the two sets of fields, then the listener invokes the synchronous notification to process the message.
If the specified criteria does not match between the message's MQMD Header fields and the Filter Criteria fields, then the synchronous notification is not invoked to process the message.
5
The synchronous notification creates the following documents types:
*Request document
*Reply document
The Request document contains the msgBody, msgHeader, queueManagerName, and queueName properties. The synchronous notification invokes the service that you selected when you configured the synchronous notification and passes in the Request document.
The specified service processes the message and returns the Reply document to WebSphere MQ Adapter. The Reply document contains the replyMsgBody, msgHeader properties, and JMS properties.
Note:
For transactional connections, if a synchronous notification processes the message, then WebSphere MQ Adapter commits the message and removes it from the queue. If the synchronous notifications do not process the message, or if they throw an exception, then WebSphere MQ Adapter will rollback the message and make it available for other applications.
6
After the service has processed the data in the Request document, then the listener retrieves another message from the queue.