[ 
https://issues.apache.org/jira/browse/ARTEMIS-2610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram resolved ARTEMIS-2610.
-------------------------------------
    Fix Version/s: 2.12.0
       Resolution: Fixed

> Improve ActiveMQServer.getConnectionCount()
> -------------------------------------------
>
>                 Key: ARTEMIS-2610
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2610
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.11.0
>            Reporter: Sebastian T
>            Priority: Minor
>              Labels: performance
>             Fix For: 2.12.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> We are using ActiveMQServer.getConnectionCount() as one metric to constantly 
> monitor our brokers via JMX.
> {{ActiveMQServer.getConnectionCount()}} currently invokes 
> {{remotingService.getConnections().size()}} to determine the connection size. 
> This is unnecessarily expensive as {{remotingService.getConnections()}} is 
> synchronized and returns a new {{Set<RemotingConnection>}} instance with all 
> connections on each invocation.
> This PR introduces a new method {{RemotingService.getConnectionCount()}} 
> which avoids the synchronization and temporary object creation.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to