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

Possible durable message count error with retryMessages()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.10.1
    • 2.11.0
    • None
    • None

    Description

      There is a possible bug with retryMessages() JMX call.

      Step 1: Send messages to a queue

      bin/artemis producer --user me --password mypassword --destination queue://MESSAGING.QUEUE.3 --message TEST
      

      Durable message count is 1000 and Durable persistence size is 394000. Message count is 1000 and FirstMessageTimestamp is 1574947152841 for this queue. First Message As Json has JSON text inside it.

      Step 2: Retry the messages
      It makes no sense to retry messages that hasn't gone to DLQ but that was what I did:

      http://my.happy.machine:8181/console/jolokia/exec/org.apache.activemq.artemis:broker=!%22amq-c!%22,component=addresses,address=!%22MESSAGING.QUEUE.3!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22MESSAGING.QUEUE.3!%22/retryMessages()
      

      Got 1000 back
      FirstMessageTimestamp is empty and FirstMessageAsJson is {} other than that all fields above is unchanged. 

      It looks to me that when retryMessages() runs on messages that have not been rollbacked enough times to reach DLQ removes the messages but does not update message count. Better would be if retryMessages didn't remove messages that have not been sent to DLQ, but as it is now it is reported to be 1000 messages on the queue but it is empty when browsing it.

      resetMessageCounter() does not fix anything and removeAllMessages() reports 0 and still 1000 messages in message count (no change to the other fields either).

      Of course, this is not done that often and service is still running fine, so it is a minor problem.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              anders.andersson Anders Andersson
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1h 10m
                  1h 10m