Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-1122

Some messages remain in pending state if broker shut down during consumption by durable subscriber

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • BugQueue
    • JBoss A-MQ 6.2
    • broker
    • None
    • Hide

      Although the customer reported this problem in a broker cluster, I can reproduce it using a single broker as follows.

      1. Start a broker
      2. Start a durable subscriber on a particular topic using any Java JMS client, such that it will consume indefinitely
      3. Start a publisher on that topic that will publish at full speed
      4. Do a "kill -9" on the broker. The clients may shut down at this point, depending on how they are coded
      5. Restart the broker and (if necessary) the consumer client. Stop the publishing client (if necessary) because it will confuse the results
      6. Once the consuming client has consumed every message it is going to, use a JMX client or the Hawtio console to examine the value of PendingQueueSize for the topic. It may be greater than zero.
      7. Restart the broker and clients; note that the problem never goes away.

      The problem is not 100% reproducible, but I see a PendingQueueSize > 0 on most test runs.

      Show
      Although the customer reported this problem in a broker cluster, I can reproduce it using a single broker as follows. 1. Start a broker 2. Start a durable subscriber on a particular topic using any Java JMS client, such that it will consume indefinitely 3. Start a publisher on that topic that will publish at full speed 4. Do a "kill -9" on the broker. The clients may shut down at this point, depending on how they are coded 5. Restart the broker and (if necessary) the consumer client. Stop the publishing client (if necessary) because it will confuse the results 6. Once the consuming client has consumed every message it is going to, use a JMX client or the Hawtio console to examine the value of PendingQueueSize for the topic. It may be greater than zero. 7. Restart the broker and clients; note that the problem never goes away. The problem is not 100% reproducible, but I see a PendingQueueSize > 0 on most test runs.

      A broker master-slave network has topics that are consumed by durable subscribers. If the active broker is shut down whilst under load, some durable subscribers show a > 0 value of PendingQueueSize, even though consumers remain attached and continue to consume. Further messages that are produced are consumed by the durable suscribers, but the pending count always remains > 0. The problem is not resolved by restarting all the brokers and all the clients and, if the KahaDB file is copied to another installation, that installation will also show the problem.

        1. fuse.log
          340 kB
        2. FailoverDuplicateDurableSubTest.java
          10 kB
        3. ap71_activemq.xml
          28 kB
        4. ap01_activemq.xml
          28 kB

            gtully@redhat.com Gary Tully
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: