What is the best way to insure that select JMS messages are processed synchronously? We are receiving batches of messages that create/update the same entity and they are stepping on each other. Luckily our model is such that the messages are easily siloed. It would be nice to be able to queue messages with a key that would make them processed synchronously.
For instance, the JMS listener would receive a message, and the queue would 'freeze' any other messages with that key such that other listeners would not get them. When the listener that got the last message returns, it would first receive any messages with the same key as the last one.
Is there anything within JMS that deals with this kind of scenario?