This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS Problem  RSS feed

 
Gavin Wilkinson
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i recently delved into the world of jms and i have to say it seems to be pretty cool. I got the examples up and running in no time at all. I have a slight problem though.
I'm now trying to use jms in real world situation. I have a sender that is wrapped deep within an existing class and a receiver that i run at the command line. If i have the receiver running and then start to post messages, it all works fine, i get the messages in the order they are being sent, however if i dont have the receiver running, send a few messages and then start the receiver, the order is all jumbled up. I was wondering if anyone had come accross this problem ?
I need to be able to gaurantee the order of receiving messages is the same as sending messages.
Cheers in advance Gavin .
------------------

[This message has been edited by Gavin Wilkinson (edited April 11, 2001).]
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, you will have to code this. From the spec:

14.4.6 Concurrency of message processing
A container allows many instances of a message-driven bean class to be executing concurrently, thus
allowing for the concurrent processing of a stream of messages. No guarantees are made as to the exact
order in which messages are delivered to the instances of the message-driven bean class, although the
container should attempt to deliver messages in order when it does not impair the concurrency of mes-sage
processing. Message-driven beans should therefore be prepared to handle messages that are out of
sequence: for example, the message to cancel a reservation may be delivered before the message to
make the reservation.

Just re-read your message, this was from the EJB spec and message driven beans. Not sure if it applies to JMS solely. I need to do some reading...
Check out JMS spec 4.4.17 at http://java.sun.com/products/jms/jms1_0_2-spec.pdf
[This message has been edited by Michael Hildner (edited April 11, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!