Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5428

Durable Subscriptions are not being setup while link stealing is happening

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.11.0
    • 5.11.0
    • MQTT
    • None
    • Activemq 5.11-SNAPSHOT with leveldb and linkstealing enabled.

    Description

      Intermittently, while an mqtt client is reconnecting, the durable subscriptions are not setup as error is thrown mentioning subscription is still active.

      the same can be reproduced by adding sleep into stopAsync method.

      ManagedTransportConnection.java
          @Override
          public void stopAsync() {
              if (!isStopping()) {
                  synchronized (this) {
                      unregisterMBean(byClientIdName);
                      unregisterMBean(byAddressName);
                      byClientIdName = null;
                      byAddressName = null;
                  }
              }
              try {
                  Thread.sleep(4000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
              super.stopAsync();
          }
      

      stacktrace:

      2014-11-10 08:07:06,632 | WARN | Error subscribing to TopicAAA | org.apache.activemq.transport.mqtt.strategy.AbstractMQTTSubscriptionStrategy | ActiveMQ NIO Worker 2
      javax.jms.JMSException: Durable consumer is in use for client: Producer and subscriptionName: EXACTLY_ONCE:TopicAAA
      at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:123)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]
      at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:427)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]
      at org.apache.activemq.broker.jmx.ManagedRegionBroker.addConsumer(ManagedRegionBroker.java:244)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]
      at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:102)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]
      at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:104)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]
      at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:102)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]
      at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:102)[activemq-broker-5.11-SNAPSHOT.jar:5.11-SNAPSHOT]

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              netlancermobi Netlancer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: