aspose file tools*
The moose likes Distributed Java and the fly likes Tried out samples and order of messages not maintained Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Tried out samples and order of messages not maintained" Watch "Tried out samples and order of messages not maintained" New topic
Author

Tried out samples and order of messages not maintained

Mike Birken
Greenhorn

Joined: Dec 28, 2001
Posts: 20
I tested out some of the samples from the JMS tutorial on Sun's site and I got some strange results. The first example in there creates a queue, a sender, and a receiver. The sender enqueses 10 messages (strings "1" through "10"). And the receiver dequeues and displays everything it gets. I was impressed with the fact that I can enqueue 10 messages and start the receiver later and still get my 10 messages back. Then I tried this: (1) run sender (i.e. enqueue "1" through "10"), (2) run sender again (i.e. enqueue "1" through "10"), (3) run receiver. This time it printed "1", "1", "2", "2", ... , "10", "10" instead of "1", "2", ... , "10", "1", "2", ... "10". Why isn't the order of the messages enqueued maintained?
- Mike
Don Schaefer
Greenhorn

Joined: Jan 22, 2002
Posts: 16
What JMS provider are you using?
Mike Birken
Greenhorn

Joined: Dec 28, 2001
Posts: 20
Sun's
- Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tried out samples and order of messages not maintained
 
Similar Threads
Seq of messages in a Pub-Sub arch... is FIFO gauranteed?
JMS or JCA or Webservice ?
Thread and Pipes problem.
Tread synchronized
MulticastSocket simply hangs on receive()