• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JMS Problem

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Something about .... going for a swim. With this tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic