[
https://issues.apache.org/jira/browse/ARTEMIS-1964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17568646#comment-17568646
]
ASF subversion and git services commented on ARTEMIS-1964:
----------------------------------------------------------
Commit ff770d540d8f60693d43b0c4c4c947cc6121941f in activemq-artemis's branch
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=ff770d540d ]
ARTEMIS-1964 fix and deprecate getNumberOfMessages() on AddressControl
AddressControl has 2 methods to get same metric. Both
getNumberOfMessages() and getMessageCount() return the same metric
albeit in different ways.
Also, getNumberOfMessages() inspects both "local" and "remote" queue
bindings which is wrong.
This commit fixes these issues via the following changes:
- Deprecate getNumberOfMessages().
- Change getNumberOfMessages() to invoke getMessageCount().
- Add a test to ensure getNumberOfMessages() does not count remote
queue bindings.
- Simplify getMessageCount(DurabilityType).
> Address control has 2 methods to get same metric
> ------------------------------------------------
>
> Key: ARTEMIS-1964
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1964
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.23.1
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {{getNumberOfMessages()}} and {{getMessageCount()}} both return the same
> metric albeit in different ways. This is confusing and should be refactored.
> Also, {{getNumberOfMessages()}} inspects both "local" and "remote" queue
> bindings which is wrong. This can result in differences between the values
> reported by each.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)