You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/09/03 11:14:00 UTC

[jira] [Work logged] (ARTEMIS-4915) TotalMessagesAdded/Acknowledged metrics are inaccurate if queues deleted

     [ https://issues.apache.org/jira/browse/ARTEMIS-4915?focusedWorklogId=932970&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-932970 ]

ASF GitHub Bot logged work on ARTEMIS-4915:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Sep/24 11:13
            Start Date: 03/Sep/24 11:13
    Worklog Time Spent: 10m 
      Work Description: gemmellr merged PR #5182:
URL: https://github.com/apache/activemq-artemis/pull/5182




Issue Time Tracking
-------------------

    Worklog Id:     (was: 932970)
    Time Spent: 20m  (was: 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: 20m
>  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: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact