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 7752195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:44:14+00:00 2026-06-01T11:44:14+00:00

In our application, we receive messages from JMS Topic. First I want to know

  • 0

In our application, we receive messages from JMS Topic.

  • First I want to know if the JMS follows FIFO policy. If not, how can an application decide which is the latest message?

We consume messages ( durable subscriber and JMS session is transacted, lot of overhead ) because messages are retained at the JMS server until the transaction commits/ends. The reason we specified transaction is

  • We are using a caching ( hibernate ) technology and a transaction to use it. So, we are using two transactions, one is JMS tx and one is caching-technology tx. When we consume the message and we want all or nothing to happen until the message is committed and acknowledgement is sent to JMS. caching tx will commit first and then immediately JMS tx will commit next and message is acknowledged, otherwise, both the tx’s will be rolledback and the message will be replayed. We are currently replaying the messages 3 times, and then if the exception still occurs, then we are sending the message to non-processable queue.

  • This works fine until lot of messages come at the same time to the JMS and needs to be processed by our system at the same time.

  • I would like to know what did you do when you encountered such scenario. Because, maintaining a durable subscription and a transacted session is a significant overhead over the JMS server and would drain the performance of the server.

  • 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-01T11:44:15+00:00Added an answer on June 1, 2026 at 11:44 am

    Message ordering for topics is not specified in the JMS spec so the official answer to that is that it is JMS implementation specific. Having said that, unless specifically overridden to do something else, I imagine that messages would be delivered in FIFO order.

    For the transactions, I suggest you look into implementing two phase commit XA transactions so you do not need two separate transactions. If your cache implementation supports XA, the JMS and Cache(and DB) transactions would be one and the same.

    Generally I have found that for these types of transacted messages, if you must used transacted messages, the best way to squeeze performance out is to process as many messages in one transaction as you can:

    1. Start a transaction
    2. Retrieve n messages (or all of them until there is a timeout)
    3. Process the messages
    4. Commit the transaction.
    5. Go To 1.

    Another way to kill 2 birds with 1 stone is to skip the processing of the message during retrieval and simply write the retrieved messages to a transacted data store. Then have a separate thread retrieve the messages from the store (in timestamp order) and process them (separate thread – = separate transaction).

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

Sidebar

Related Questions

We receive this error quite frequently from our appengine application. Are other people receiving
In our application, we receive text files ( .txt , .csv , etc.) from
Our Java application receives XML messages from a number of external systems and from
Our application takes text from a web form and sends it via email to
Our application downloads data from the internet using RSS but is having connection problems
Our application follows the approach of maintaining a DataContext per Thread/HttpContext, using the DataContextFactory
Our application uses Hibernate with Sql Server 2005. Being a DBA, I am not
We've built up an application infrastructure based on ActiveMQ. We can send and receive
We've implemented a background service in our Asp.Net web app that receives messages from
In our application, we have a download flow that works as follows: On main

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.