Strict message ordering using the strict message ordering facility of the WebSphere Application Server default messaging provider

Strict message ordering can be achieved when deploying message driven bean applications to the WebSphere® MQ messaging provider for WebSphere Application Server when no special facilities have been coded into the application to handle messages arriving out of order by using the strict message ordering facility of the WebSphere Application Server 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 theWebSphere MQ queue has been set to 0.

Configuration for ordered delivery

  • A service integration bus, with a WebSphere MQ link between the WebSphere MQ queue manager hosting the queue and the bus.
  • If a mixture of persistent and nonpersistent messages might be sent within an ordered sequence, you must set the non-persistent message speed (NPMSPEED) on the WebSphere MQ sender channel to NORMAL.
  • You must 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.
  • You must replace the local queue definition with a remote queue definition within WebSphere MQ, so that messages that are sent to the destination queue are forwarded over the WebSphere MQ link to the bus.
    Note: 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 WebSphere MQ (which include when sending over a channel) with the additional messages ordering facilities provided by the default messaging provider for WebSphere Application Server (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 a WebSphere MQ topology.
  • It also adds internal complexity as messages are converted automatically between the low level WebSphere MQ and default messaging provider formats as they travel over the WebSphere 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 WebSphere MQ link between the queue manager and the bus. For more information about the options available for ensuring that the connection to a failover WebSphere Application Server gateway messaging engine is reinstated, see High availability of messaging engines that are connected to WebSphere MQ.