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

TotalMessagesAdded/Acknowledged descriptions are misleading

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          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

                Slack

                  Issue deployment