ActiveMQ
  1. ActiveMQ
  2. AMQ-2517

Client stops receiving messages from topic after about 30 minutes of inactivity

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.2.0, 5.3.0
    • Fix Version/s: 5.6.0
    • Component/s: JMS client
    • Labels:
      None
    • Environment:

      Ubuntu Karmic Koala
      java version "1.5.0_11"

      Description

      Hello,
      I have very simple ActiveMQ JMS client that listens on a topic. It works fine, but after about 30 minutes when there is no traffic, it "does not hear" anything.
      Also, AMQ console indicates that there is one less consumer on that topic.
      It seems to me somewhat similar to issue #AMQ-1251.
      This behavior is the same on 5.2.0 and 5.3.0 version - always deployed both on provider and client side.

      Is there a setting that might influence/workarround it ?

        Activity

        Gary Tully made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 5.6.0 [ 12317974 ]
        Fix Version/s 5.x [ 12316331 ]
        Hide
        Gary Tully added a comment -

        closing again with correct fix version

        Show
        Gary Tully added a comment - closing again with correct fix version
        Gary Tully made changes -
        Resolution Cannot Reproduce [ 5 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Hide
        Gary Tully added a comment -

        reopen to set fix version to 5.6

        Show
        Gary Tully added a comment - reopen to set fix version to 5.6
        Timothy Bish made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Cannot Reproduce [ 5 ]
        Hide
        Timothy Bish added a comment -

        This could be related to issues that were fixed in the NMS client. Reopen if the problem still exists using the latest ActiveMQ and NMS client library.

        Show
        Timothy Bish added a comment - This could be related to issues that were fixed in the NMS client. Reopen if the problem still exists using the latest ActiveMQ and NMS client library.
        Gary Tully made changes -
        Fix Version/s 5.5.0 [ 12315626 ]
        Fix Version/s 5.6.0 [ 12316331 ]
        Dejan Bosanac made changes -
        Fix Version/s 5.5.0 [ 12315626 ]
        Fix Version/s 5.4.2 [ 12315625 ]
        Jeff Turner made changes -
        Project Import Fri Nov 26 22:32:02 EST 2010 [ 1290828722158 ]
        Bruce Snyder made changes -
        Fix Version/s 5.4.1 [ 12332 ]
        Fix Version/s 5.5.0 [ 12344 ]
        Rob Davies made changes -
        Field Original Value New Value
        Fix Version/s 5.4.1 [ 12332 ]
        Hide
        Marko added a comment -

        Hi,

        I am also experiencing same problem.

        I am using ActiveMQ broker (v 5.3.1) and NMS ActiveMQ clients.

        Consumer is subscribed to topic and uses asynchronous message receiving. However problem appears when consumer is idle for about 30 minutes, that is consumer stops receiving messages after it has been idle for approximately 30 minutes.

        This problem does not appear when both clients and broker are running on same machine. Everything works fine when consumer application is restarted.

        I have set maxInactivityDuration to 0.

        I have also set handlers for ConnectionInterruptedListener, ConnectionResumedListener and ExceptionListener but no events are fired.

        After I close consumer application ACTIVEMQ console does report one consumer less.

        Here is transport connector configuration element in activemq.xml:

        <transportConnector name="openwire"
        uri="tcp://0.0.0.0:61616?wireFormat.maxInactivityDuration=0&keepAlive=true" discoveryUri="multicast://default"/>

        and client connects by using following uri:

        "failover:(tcp://somehost:61616?wireFormat.maxInactivityDuration=0)"

        Any idea why is this happening?

        Show
        Marko added a comment - Hi, I am also experiencing same problem. I am using ActiveMQ broker (v 5.3.1) and NMS ActiveMQ clients. Consumer is subscribed to topic and uses asynchronous message receiving. However problem appears when consumer is idle for about 30 minutes, that is consumer stops receiving messages after it has been idle for approximately 30 minutes. This problem does not appear when both clients and broker are running on same machine. Everything works fine when consumer application is restarted. I have set maxInactivityDuration to 0. I have also set handlers for ConnectionInterruptedListener, ConnectionResumedListener and ExceptionListener but no events are fired. After I close consumer application ACTIVEMQ console does report one consumer less. Here is transport connector configuration element in activemq.xml: <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?wireFormat.maxInactivityDuration=0&keepAlive=true" discoveryUri="multicast://default"/> and client connects by using following uri: "failover:(tcp://somehost:61616?wireFormat.maxInactivityDuration=0)" Any idea why is this happening?
        Hide
        SuoNayi added a comment - - edited

        A AMQ(5.2.0) Broker server and three durable subscribers(no message selector).
        It work fine usually.
        After a few days one producer send a message successfully, but the subscribers do not receive any messages.
        Restart the subscribers, it does not work yet.
        Restart the Broker, three subscribers receive message this time.
        I'm so confused what's wrong.

        Show
        SuoNayi added a comment - - edited A AMQ(5.2.0) Broker server and three durable subscribers(no message selector). It work fine usually. After a few days one producer send a message successfully, but the subscribers do not receive any messages. Restart the subscribers, it does not work yet. Restart the Broker, three subscribers receive message this time. I'm so confused what's wrong.
        Hide
        Petr Kozelka added a comment -

        btw, restarting the client helps, for next few minutes

        Show
        Petr Kozelka added a comment - btw, restarting the client helps, for next few minutes
        Petr Kozelka created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Petr Kozelka
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development