FUSE Message Broker
  1. FUSE Message Broker
  2. MB-931

Web console shows incorrect number of messages for topic

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 5.4.2-fuse-00-00, 5.4.2-fuse-02-00, 5.5.0-fuse-00-00
    • Component/s: broker
    • Labels:
      None
    • Environment:
      OSX 10.6.6, JDK 1.6.0_24, activemq 5.5.0-fuse-00-27, 5.4.2-fuse-02-00, and 5.4.2-fuse-00-00
    • Similar Issues:
      Show 10 results 

      Description

      Creating a Topic, producing 100 messages to it, starting a consumer that consumes 50 then stops, then when started again and consumes the other 50, leaves the web console showing 100 messages still enqueued when in reality there are none. Original report of issue in DEV-3296, see there for modified example/build.xml file to reproduce the problem.

        Activity

        Hide
        Gary Tully
        added a comment -

        do you see the same behavior with jconsole?

        Show
        Gary Tully
        added a comment - do you see the same behavior with jconsole?
        Hide
        Gary Tully
        added a comment -

        This issue seems to be just related to the counters.
        The enqueueCount for a topic is the number of messages sent to that topic but it is not decremented by consumers, it is increment only. It should be 100. The dequeueCount is always 0 for a topic, because it will quickly exceed the enqueueCount when there are more than one topic subscription.

        The inflight count is broken with durable subscriptions when keepDurableSubsActive (default true) is enabled. I will fix this, such that inflight count is decremented when the durable sub goes offline.

        The visibility of an offline durable sub can also be improved, the current name "false" is not intuitive. I will fix that also and reuse the subscriptionKey. With keepDurableSubsActive, the subscription is still active so the enqueues/dequeues for that subscription MBean will be correct.

        Show
        Gary Tully
        added a comment - This issue seems to be just related to the counters. The enqueueCount for a topic is the number of messages sent to that topic but it is not decremented by consumers, it is increment only. It should be 100. The dequeueCount is always 0 for a topic, because it will quickly exceed the enqueueCount when there are more than one topic subscription. The inflight count is broken with durable subscriptions when keepDurableSubsActive (default true) is enabled. I will fix this, such that inflight count is decremented when the durable sub goes offline. The visibility of an offline durable sub can also be improved, the current name "false" is not intuitive. I will fix that also and reuse the subscriptionKey. With keepDurableSubsActive, the subscription is still active so the enqueues/dequeues for that subscription MBean will be correct.
        Hide
        Gary Tully
        added a comment -

        have implemented some improvements on the inflight count and mbean name for an inactive durable sub. I found one case where a durable subscription could not retrieve all messages. It required the broker attribute: keepDurableSubsActive=false (which is not the default). Added a test and a fix in https://issues.apache.org/jira/browse/AMQ-3442

        The dequeueCounter is still 0 for a topic and the enqueueCounter reflects messages sent to a topic. Inflight is now updated when a durable deactivates.

        Show
        Gary Tully
        added a comment - have implemented some improvements on the inflight count and mbean name for an inactive durable sub. I found one case where a durable subscription could not retrieve all messages. It required the broker attribute: keepDurableSubsActive=false (which is not the default). Added a test and a fix in https://issues.apache.org/jira/browse/AMQ-3442 The dequeueCounter is still 0 for a topic and the enqueueCounter reflects messages sent to a topic. Inflight is now updated when a durable deactivates.
        Hide
        Gary Tully
        added a comment -

        merged to 5.5.x

        Show
        Gary Tully
        added a comment - merged to 5.5.x

          People

          • Assignee:
            Gary Tully
            Reporter:
            Roddie Kieley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: