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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:59:33+00:00 2026-06-10T12:59:33+00:00

I am using spring jms listener as defined below. and it generally works fine

  • 0

I am using spring jms listener as defined below. and it generally works fine however i see a it constantly disconnecting and reconnecting based on the recieveTimeout setting.

<bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <!-- mrgm connection to the jca adapter -->
    <property name="connectionFactory" ref="mrgmConnectionFactory" />
    <!-- name of the topic -->
    <property name="destinationName" value="test.destinationname" />
    <!-- class which will listen for messages (must implement javax.jms.MessageListener -->
    <property name="messageListener" ref="TestListener" />
    <property name="sessionTransacted" value="true" />
    <property name="receiveTimeout" value="1000" />
            <!--turning this on drops all messages -->
            <!--        <property name="pubSubDomain" value="true" /> -->

</bean>

I have done some test and when there are alot of messages being posted to the topic it will drop some because if the message comes during the small period between the disconnect and reconnect it will obviously be missed by the listener.

if i set the recieveTimeout to 0 this problem goes away. should i always set the recieveTimeout to 0 when listenting on a topic? or am I going about this whole process the wrong way.

  • 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-10T12:59:35+00:00Added an answer on June 10, 2026 at 12:59 pm

    When disconnecting and reconnecting, if your subscriber is not durable, you might loose messages. However the spring DMLC should not reconnect. Can you troubleshoot that a bit more? It should essentially subscribe to a topic session.createConsumer(..) then loop consumer.receive() or consumer.receive(timeout). Not sure why your DMLC reconnects when setting the timeout higher.

    You should be fine with no timeout, though, but you might want to track the cause to the reconnect with debug logging etc.

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

Sidebar

Related Questions

I'm using spring-jms-3.0.6.RELEASE and open MQ. Any ideas on why the below exception would
I have a system which contains multiple applications connected together using JMS and Spring
I am using Spring on Tomcat. I want to use JMS Timer. Is there
Right now I'm exposing the service layer of my application using spring remoting's RMI/SOAP/JMS/Hessian/Burlap/HttpInvoker
We are using Spring JMS to read messages from an Oracle AQ queue. When
I am using Spring JMS to connect to a Websphere MQ server. I implemented
I'm trying to run the Camel Example camel-example-spring-jms (also at http://activemq.apache.org/camel/tutorial-jmsremoting.html ). However, when
Using Spring-JMS it is possible to receive messages within an external transaction context via
So question is how to temporary stop and start a jms listener created using
I build a REST web service (using JAX-RS, Spring, Spring JMS, and ActiveMQ). I'm

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.