Network Deployment (Distributed operating systems), v8.0 > Applications > Messaging resources > Interoperation with WebSphere MQ > Interoperation using the WebSphere MQ messaging provider


Strict message ordering with the WebSphere MQ messaging provider and message-driven bean (MDB) applications

Message ordering is important to some asynchronous messaging applications; that is, it is important to process messages in the same order that the producer sends them. If this type of message ordering is important to the application, your design must take it into account.

For example, a messaging application that processes seat reservations might have producer components and a consumer component. A producer component sends a message to the consumer component when a customer reserves a seat. If the customer cancels the reservation then the producer (or possibly a different producer) sends a second message. Typically, the consumer component must process the first message (which reserves the seat) before it processes the second message (which cancels the reservation).

Some applications use a synchronous (request-response) pattern where the producer waits for a response to each message before it sends the next message. In this type of application, the consumer controls the order in which it receives the messages and can ensure that this is the same order as the producer or producers send them. Other applications use an asynchronous (fire and forget) pattern where the producer sends messages without waiting for responses. Even for this type of application, order is usually preserved; that is, a consumer can expect to receive messages in the same order as the producer or producers send them, especially when there is a significant time between sending consecutive messages. However your design must consider factors that can disrupt this order.

The order of messages is disrupted if the application sends messages with different priorities (higher priority messages can overtake lower priority messages) or if the application explicitly receives a message other than the first by specifying message selectors. Parallel processing and error or exception processing can also affect message ordering.

The following topics explain how strict message ordering can be achieved when deploying message-driven bean applications to the WebSphere MQ messaging provider for WAS when no special facilities have been coded into the application to handle messages arriving out of order:

For WAS v7 and later, listener ports are stabilized. For more information, read the article on stabilized features. You should plan to migrate your WebSphere MQ message-driven bean deployment configurations from using listener ports to using activation specifications. However, you should not begin this migration until you are sure the application does not have to work on application servers earlier than WAS v7. For example, if we have an application server cluster with some members at v6.1 and some at v7, you should not migrate applications on that cluster to use activation specifications until after you migrate all the application servers in the cluster to v7.


Related


Strict message ordering using non-ASF listener ports
Strict message ordering using activation specifications or ASF listener ports connected to WebSphere MQ v7.0
Strict message ordering using activation specifications or ASF listener ports connected to WebSphere MQ v6.0
Interoperation using the WebSphere MQ messaging provider


Related


Stabilized features
WebSphere MQ library Concept topic

+

Search Tips   |   Advanced Search