activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khandelwalanuj <khandelwal.anu...@gmail.com>
Subject Current Connection Count for ActiveMQ broker
Date Wed, 22 Jan 2014 14:40:33 GMT
Hi,

I want to know current connection count for ActiveMQ broker. I am using
below APIs for this:
-------------------------------------------------------------------
BrokerService brokerService = getBrokerService();
connectors = brokerService.getTransportConnectors();
for (int i = 0 ; i < 3; i++)
{
    TransportConnector t = connectors .get(i);
    LOG.info("t.getConnections().size());
}
-------------------------------------------------------------------

Is this the right way or I should use some other approach ?


Thanks,
Anuj




--
View this message in context: http://activemq.2283324.n4.nabble.com/Current-Connection-Count-for-ActiveMQ-broker-tp4676635.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message