[
https://issues.apache.org/jira/browse/ARTEMIS-4915?focusedWorklogId=931836&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-931836
]
ASF GitHub Bot logged work on ARTEMIS-4915:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 27/Aug/24 03:14
Start Date: 27/Aug/24 03:14
Worklog Time Spent: 10m
Work Description: jbertram opened a new pull request, #5182:
URL: https://github.com/apache/activemq-artemis/pull/5182
(no comment)
Issue Time Tracking
-------------------
Worklog Id: (was: 931836)
Remaining Estimate: 0h
Time Spent: 10m
> TotalMessagesAdded/Acknowledged metrics are inaccurate if queues deleted
> ------------------------------------------------------------------------
>
> Key: ARTEMIS-4915
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4915
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: JMX, management
> Reporter: Josh Byster
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, the total messages added/acknowledged fields are computed by
> summing up the counts on the individual queues, i.e.
> {code:java}
> @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;
> }
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact