Strict message ordering with the IBM 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.
Subtopics
- Strict message ordering using non-ASF listener ports
Strict message ordering can be achieved when deploying message driven bean applications to the IBM MQ messaging provider when no special facilities have been coded into the application to handle messages arriving out of order.- Strict message ordering using activation specifications or ASF listener ports connected to IBM MQ v7.x
Strict message ordering can be achieved when deploying message driven bean applications to the IBM MQ messaging provider when no special facilities have been coded into the application to handle messages arriving out of order.- Strict message ordering using activation specifications or ASF listener ports connected to IBM MQ v6.0
Strict message ordering can be achieved when deploying message driven bean applications to the IBM MQ messaging provider for when no special facilities have been coded into the application to handle messages arriving out of order.
Stabilized features of WAS traditional