Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
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
Issue Links
- links to