Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4915

TotalMessagesAdded/Acknowledged descriptions are misleading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.38.0
    • JMX, management
    • None

    Description

      Currently, the total messages added/acknowledged fields are computed by summing up the counts on the individual queues, i.e.

         @Override
         public long getTotalMessagesAdded() {
            long total = 0;
      
            for (Binding binding : iterableOf(postOffice.getAllBindings())) {
               if (binding.getType() == BindingType.LOCAL_QUEUE) {
                  total += ((LocalQueueBinding) binding).getQueue().getMessagesAdded();
               }
            }
      
            return total;
         }
      

      This fails to give an accurate count if queues are being created or deleted (for example, as consumers disconnect or reconnect).
      This can easily be demonstrated by sending messages and then disconnecting all consumers (with queue auto-deletion) and seeing the "messages added" count drop to 0.

      Attachments

        Issue Links

          Activity

            People

              jbertram Justin Bertram
              Josh B Josh Byster
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m