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

ASF GitHub Bot logged work on AMQ-9548:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Aug/24 08:30
            Start Date: 27/Aug/24 08:30
    Worklog Time Spent: 10m 
      Work Description: kenliao94 opened a new pull request, #1288:
URL: https://github.com/apache/activemq/pull/1288

   **What problems does this PR solve?**
   Currently, to get the total number of queues and topics on the broker using 
JMX, one needs to query the attribute values of Queues and Topics on the broker 
MBean then post-process it (finding the length of returned array) to get that 
data. This can be resource intensive (unnecessary copy of the data) on the 
customer application using JMX or Jolokia if user has tens or thousands of 
destinations and all the user wants is the number. Hence this PR added two 
attributes so customer application can just query the total number without 
getting the list of topics and queues first.
   
   **Why is it beneficial to merge into ActiveMQ?**
   This will be beneficial for users with high number of destinations. They can 
now monitor the total number of queues and topics in a more performant way.
   
   **How do you make sure this PR is well tested?**
   - Added unit test in the PR
   - Tested with Jolokia (cross-checked with the web console) [see attachment 
below]
   - Tested with Jconsole (cross-checked with the web console) [see attachment 
below]
   
   
![image](https://github.com/user-attachments/assets/d03ec47d-acd1-415a-9761-b0e754873e11)
   
![image](https://github.com/user-attachments/assets/43ef4571-fec4-41a1-a13f-9967ff19c9a2)
   
![image](https://github.com/user-attachments/assets/cbef9f3d-f3c0-4661-96ab-0ce80cc56184)
   
   
   




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

            Worklog Id:     (was: 931881)
    Remaining Estimate: 0h
            Time Spent: 10m

> Add new broker mbean attributes to directly retrieve total number of queues 
> and topics
> --------------------------------------------------------------------------------------
>
>                 Key: AMQ-9548
>                 URL: https://issues.apache.org/jira/browse/AMQ-9548
>             Project: ActiveMQ Classic
>          Issue Type: Improvement
>          Components: JMX
>    Affects Versions: 5.18.5, 6.1.2
>            Reporter: Ken Liao
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 6.2.0, 6.1.4
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Right now, to monitor the number of destination, the only way is to read the 
> destinations MBean and get the total destination. However, this means reading 
> all destination names into memory, if the user has 10K+ destination with long 
> destination name, it will be a large amount of memory just to monitor the 
> number of them. 
> The proposal here is to add either a new MBean value or a method to obtain 
> that data. We can also add a method to retrieve the first K destination as 
> well.



--
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


Reply via email to