• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Doubt in Ordering of JMS queue messages

 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Head First EJB book MDB chapter says that queues are not ordered. The ordering of messages is not guaranteed and we should not program depending on an order. The JMS book by RMH says that queue messages will be ordered and will be delivered to the receivers in the same order in which they were delivered to the queue by the message server. So which is right? Are queue messages ordered or unordered? Are they guaranteed to be delivered to the receiver in the same order in which they were sent by the sender? What happens if there are multiple receivers? Will that affect the ordering? Please clarify.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know you cannot code according to the order of messages because if one message fails (transaction rolled back) then it is placed at the back of the queue behind any messages that were posted before it.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Are queue messages ordered or unordered?


There is nothing the the J2EE spec. to require JMS providers to maintian message queue order, so always assume they are unordered.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic