[AMQ 7.0] JMX attributes "Mesage count", "Messages added", "Message acknowledged" get out of sync

Solution Verified - Updated

Environment

  • JBoss AMQ
    • 7.0.0
    • 7.0.1
    • 7.0.2

Issue

  • Its possible that the queue JMX attributes "Mesage count", "Messages added", "Message acknowledged" get out of sync. Sometimes hawtio reports a higher value for "Messages added" than "Message acknowledged" while "Message count" is 0 and all messages got correctly consumed by the connected consumers.

Resolution

The problem is fixed in AMQ 7.0.3.

Root Cause

The problem is caused by bug Content from issues.jboss.org is not included.ENTMQBR-782.

Diagnostic Steps

The values for the JMX attributes "Message count", "Messages added", "Message acknowledged" generally do not need to always be in sync!
The count for "Messages added" will only be increased if a producer sends a message. Likewise "Message acknowledged" is only increased if a consumer acknowledges a messages.
If a broker has messages in its store upon restart, then its expected that these counts may not be in sync. Even when all messages on a queue got consumed, its likely that "Message acknowledged" will be higher than "Messages added".

In the particular problem of Content from issues.jboss.org is not included.ENTMQBR-782 however the test started with an empty broker (no messages in the store) and a consumer received exactly the same number of messages that a producer sent to the broker during the test.
At the end of the test the numbers for "Messages added" and "Message acknowledged" were not the same, even though the value for "Message count" was 0. This particular problem got fixed in Content from issues.jboss.org is not included.ENTMQBR-782.

Product(s)
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.