Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order of messages with multiple mdb's

 
Amey Sane
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Well, I have this kind of trivial problem for me.
I have a JMS queue, where I have some message objects stored.
Multiple MDB instaces can listen to this queue at runtime.
Now, each of this MDB instance picks up an object from the queue, as and when it arrives.
Then, it performs some operations on this object (which is not all that important in this context).
After this, that MDB instance places the object it has processed in another queue.
However, I am not understanding, how do i maintain the order of objects in another queue.
I mean, the order in which objects were picked up from the first queue and the order in which they are placed in another queue after processing, should be same.
Any suggestions?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amey,
What are you trying to accomplish that you need the messages in a certain order? Would putting a sequence number in the message help? More information will help people here give a more useful answer.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot Guarantee the order ,if you use pool of MDBs.

If you want the order use only single MDB.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic