posted 20 years ago
I want to implement JMS with one queue. I want the messages to be consumed based on priority, for example
If I have 3 message which have priorites 2,3, and 4, the messages will be consumed accordingly but when a new message is added to the queue, the application will decide what would be the priority of that message and say it assigns priority 1 then this messaage has to be consumed first (which will be done).
My question is - if before the msg with priority 1 is consumed another msg with priority 2 is added so that we have 2 msgs with priority 2 then after the first msg is consumed it should consume the first (earlier) msg with priority 2 and then the second msg.
Is this the way it operates or how else does it happen. I am in the design stage and so want to undersand this. Can some one help me in clarifying this?
Thanks in advance!