Strict message ordering using the strict message ordering facility of the WAS default messaging provider
Strict message ordering can be achieved when deploying message driven bean applications to the IBM MQ messaging provider for WebSphere Application Server when no special facilities have been coded into the application to handle messages arriving out of order using the strict message ordering facility of the WAS default messaging provider.
The following assumptions have been made in this scenario:
- The message-driven bean (MDB) application is transactional.
- The back-out threshold (BOTHRESH) on theIBM MQ queue has been set to 0.
Configuration for ordered delivery
- A service integration bus, with an IBM MQ link between the IBM MQ queue manager hosting the queue and the bus.
- If a mixture of persistent and nonpersistent messages might be sent within an ordered sequence, set the non-persistent message speed (NPMSPEED) on the IBM MQ sender channel to NORMAL.
- Configure a destination in the bus with the Strict message ordering option selected, which the MDB application consumes from through a default messaging provider activation specification.
- We must replace the local queue definition with a remote queue definition within IBM MQ, so that messages sent to the destination queue are forwarded over the IBM MQ link to the bus.
This configuration is just one possible option for configuring queue name resolution within the queue manager to forward messages over the link.
Important information about this configuration
- This deployment option combines the message ordering capabilities of IBM MQ (which include when sending over a channel) with the additional messages ordering facilities provided by the default messaging provider for WAS (which prevent out of order delivery in transaction recovery scenarios).
- This deployment option is complex as it requires planning, and runtime administration, of a bus topology in addition to an IBM MQ topology.
- It also adds internal complexity as messages are converted automatically between the low level IBM MQ and default messaging provider formats as they travel over the IBM MQ link.
Circumstances in which messages can arrive out of order
There are no circumstances in which this deployment is expected to cause messages to be delivered out of order.
Considerations for clustered deployment
- Ordered delivery from the bus destination to the MDB is enforced automatically in a clustered environment when the Strict message ordering option is selected for the destination.
- The main consideration for a clustered environment is establishing high availability of the IBM MQ link between the queue manager and the bus. For more information about the options available for ensuring that the connection to a failover WAS gateway messaging engine is reinstated, see High availability of messaging engines connected to IBM MQ.
Related:
Strict message ordering with the IBM MQ messaging provider and message-driven bean (MDB) applications Bus configurations Strict message ordering for bus destinations