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

Discrepancy in message counts / address sizes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.20.0
    • 2.24.0
    • None
    • None
    • Artemis 2.20.0 on Centos7 with Dual Mirror, previously Artemis 2.17.0 with a different mirror connection.

    Description

      I have a large number of queues in my production environment with strange or impossible statistics.

      For instance in the ExpiryQueue in the attached screenshot, the number of messages reported is 11907. We only send small messages, the address memory used by that queue is 55.67MB.

      However if you include any filter, even 1=1 the number of messages is a much smaller (in the 20s).

      The removeAllMessages operation only removes and reports the smaller number, so the rest of the 11907 messages are stuck.

      As mentioned on the mailing list, there are a number of other strange attributes on this and other queues, in all of our Artemis instances in production, such a negative delivering counts and sizes (should be 0 in this case, it's the cold side of a Dual Mirror and ExpiryQueue has never had any consumers outside of management console operations):

      {
          "request": {
              "mbean": "org.apache.activemq.artemis:broker=\"artms1\",component=addresses,address=\"ExpiryQueue\",subcomponent=queues,routing-type=\"anycast\",queue=\"ExpiryQueue\"",
              "type": "read"
          },
          "value": {
              "ConfigurationManaged": true,
              "Address": "ExpiryQueue",
              "MaxConsumers": -1,
              "Exclusive": false,
              "DurableDeliveringSize": -2322269,
              "PersistentSize": 11415198,
              "GroupBuckets": -1,
              "Name": "ExpiryQueue",
              "MessagesKilled": 39634,
              "DelayBeforeDispatch": -1,
              "DurableMessageCount": 11989,
              "PreparedTransactionMessageCount": 0,
              "ID": 7,
              "RetroactiveResource": false,
              "DeadLetterAddress": "DLQ",
              "MessagesAcknowledged": 1851,
              "MessagesExpired": 0,
              "DeliveringSize": -2322269,
              "LastValue": false,
              "LastValueKey": null,
              "DurableScheduledSize": 0,
              "GroupRebalance": false,
              "GroupFirstKey": null,
              "User": null,
              "GroupCount": 0,
              "PurgeOnNoConsumers": false,
              "ScheduledCount": 0,
              "DurableScheduledCount": 0,
              "ConsumersBeforeDispatch": 0,
              "ExpiryAddress": "ExpiryQueue",
              "FirstMessageAsJSON": "ERROR: java.lang.NullPointerException (class javax.management.RuntimeMBeanException)",
              "GroupRebalancePauseDispatch": false,
              "Paused": false,
              "RoutingType": "ANYCAST",
              "DurableDeliveringCount": -1961,
              "FirstMessageAge": "ERROR: java.lang.NullPointerException (class javax.management.RuntimeMBeanException)",
              "DurablePersistentSize": 11415198,
              "MessagesAdded": 53584,
              "ConsumerCount": 0,
              "RingSize": -1,
              "DeliveringCount": -1961,
              "Enabled": true,
              "AcknowledgeAttempts": 41485,
              "Temporary": false,
              "FirstMessageTimestamp": "ERROR: java.lang.NullPointerException (class javax.management.RuntimeMBeanException)",
              "Filter": null,
              "ScheduledSize": 0,
              "Durable": true,
              "MessageCount": 11989
          },
          "timestamp": 1648125827,
          "status": 200
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebaker Stephen Baker
              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 - 20m
                  20m