Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 948291081E for ; Tue, 28 Jan 2014 15:42:17 +0000 (UTC) Received: (qmail 37752 invoked by uid 500); 28 Jan 2014 15:42:16 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 37713 invoked by uid 500); 28 Jan 2014 15:42:12 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 37699 invoked by uid 99); 28 Jan 2014 15:42:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 15:42:10 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of khandelwal.anuj90@gmail.com does not designate 216.139.250.139 as permitted sender) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 15:42:05 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1W8Ams-0006xu-O9 for users@activemq.apache.org; Tue, 28 Jan 2014 07:41:18 -0800 Date: Tue, 28 Jan 2014 07:41:03 -0800 (PST) From: khandelwalanuj To: users@activemq.apache.org Message-ID: <1390923663727-4676902.post@n4.nabble.com> In-Reply-To: References: <1390456791556-4676694.post@n4.nabble.com> <1390534570857-4676726.post@n4.nabble.com> <1390553547046-4676729.post@n4.nabble.com> <1390566311285-4676741.post@n4.nabble.com> <1390568578953-4676748.post@n4.nabble.com> <1390570286585-4676752.post@n4.nabble.com> Subject: Re: Current Connection Count for ActiveMQ broker MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am trying to do periodic logging of ActiveMQ stats using plugin. I will log all the stats per minutes. Stats includes: enqueue count, dequeue count, dispatch count, connection count, Producer/consumer count, Durable subscriber count and Dynamic Destination producer count etc. The way I am doing is by creating <-------------------------------------------------> *BrokerViewMBean brokerView = (BrokerViewMBean) getBrokerService().getManagementContext().newProxyInstance(brokerName, BrokerViewMBean.class, true); myCurrentDurableSubscriberCount = brokerView.getDurableTopicSubscribers().length; myCurrentDynamicProducerCount = brokerView.getDynamicDestinationProducers().length; . . . (similarly I am getting other values) *<-------------------------------------------------> Is this the best way way to implement the requirement ? Are there any other getter methods available for these stats because it looks to me a heavy operation which might bring down the broker performance since it is creating lot of objects and strings in one call and I have to call this every minute (for periodic logging per minute) Thanks, Anuj -- View this message in context: http://activemq.2283324.n4.nabble.com/Current-Connection-Count-for-ActiveMQ-broker-tp4676635p4676902.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.