Hi,

Can anyone post your comments on how to implement the message consuming order using spring jms for the below scenerio.

1. Joe clicks the order button from his shopping cart.
2. The order message (message A) is placed on Queue1.
3. Joe cancels the order.
4. The cancel order (message B) is placed on Queue1.
5. MdbX takes message A from Queue1.
6. MdbY takes message B from Queue1.
7. MdbY writes the cancel message to the database. Because there is no corresponding order message, there is no order message to remove from the database.
8. MdbX writes the order message to the database.
9. An application responsible for shipping books reads the database, sees the order message, and initiates shipment to Joe’s home.

Where multiple MDB's are pointing to the same queue and consumes the message as and whne it comes. So it will ends up issuing the order and its doesn't aware of cancellation. Valuable suggestions most welcome.