Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7918397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:29:40+00:00 2026-06-03T15:29:40+00:00

Recently a colleague of mine said this: When using different sessions for producing and

  • 0

Recently a colleague of mine said this:

When using different sessions for producing and consuming messages, there’s no guarantee that messages are delivered in the same order in which they are produced.

Now I know that JMS does not guarantee message delivery order in general, but this ‘multiple sessions’ angle is new to me. Is there any truth to this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:29:41+00:00Added an answer on June 3, 2026 at 3:29 pm

    According to the JMS Spec (section 4.4.10 Message Order) only the order of messages sent from a session to a destination is guaranteed (and even then with some caveats).

    This means:

    • the order of two messages sent from the same session to two different destinations is not defined
    • the order of two messages sent from two different sessions to the same destination is not defined
    • the order of two messages sent from two different sessions to two different destinations is not defined.

    Only the order of two messages sent from one session to the same destination is defined.

    Note that it’s possible that a given JMS implementation will usually deliver items in the (global) order in which they are produced. But you should not rely on this in any way, since it’s basically a “best effort” thing: if they can manage it, it’s usually better. If they can’t, they are still well within the specification and your application must be able to handle that.

    tl;dr Yes, your colleague is correct. Note again that even the guarantee in the one-session/one-destination case is not very strong, particularly if different message options are involved (see the linked PDF for details).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently discussed with a colleague about mocking. He said that mocking classes is
I was recently advocating to a colleague that we replace some C# code that
A colleague of mine recently stated it is fine for multiple read write threads
We recently added auditing to our database. A colleague implemented it using triggers and
I recently took over a project that a colleague was working on and I
A colleague recently asked me how to deep-clone a Map and I realized that
I recently made the statement to a colleague that: NullReferenceExceptions should never be explicitly
I've recently been told by a colleague that Firefox 3.6 supports native drag and
Recently, I saw a colleague of mine instantiate his classes in a constructor, so
I inherited a piece of code from a recently-retired colleague that gets the total

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.