-
Bug
-
Resolution: Done
-
Major
-
AMQ 7.2.4.GA
-
-
+
-
ARTEMIS-2305
-
Verified in a release
-
If a message is added to a destination, the metric MESSAGES_ADDED is incremented, along with MESSAGE_COUNT. When a message is successfully removed, MESSAGE_COUNT is decremented, and MESSAGES_ACKNOWLEDGED is incremented. When a destination is empty, we would expect MESSAGES_ADDED and MESSAGES_ACKNOWLEDGED to be equal.
Unfortunately, if a message is consumed as part of an XA transaction that rolls back, MESSAGES_ACKNOWLEDGED is still incremented, although the message has, by definition, not been acknowledged by the client. In situations where message processing sometimes fails and has to be re-tried, the statistics soon lose coherence. While this doesn't seem to be a problem except inasmuch as it leads to confusing metrics, it makes it difficult to troubleshoot other issues that require the metrics to be meaningful.