mattrpav commented on code in PR #1288:
URL: https://github.com/apache/activemq/pull/1288#discussion_r1813359924
##########
activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java:
##########
@@ -280,11 +280,21 @@ public ObjectName[] getTopics() {
return safeGetBroker().getTopicsNonSuppressed();
}
+ @Override
+ public int getTotalTopicsCount() {
+ return getTopics().length;
+ }
+
@Override
public ObjectName[] getQueues() {
return safeGetBroker().getQueuesNonSuppressed();
}
+ @Override
+ public int getTotalQueuesCount() {
+ return getQueues().length;
Review Comment:
> Maybe it's more a matter of operation name. Both operations could make
sense (depending of the user cases).
I'd be fine with adding a metric with different method name, while not
allocating the array to do it ;-)
```
public int getNonSuppressedQueueCount() {
return managedBroker.getQueueViews().size()
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact