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