You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by chrismfwrd <ch...@gmail.com> on 2008/09/30 12:17:35 UTC

Re: how can get the number of consumers on a queue

Hi,

how can I connect the DestinationSource and the DestinationStatistics?
I can get a DestinationSource object from an active ActiveMQConnection
containing information about the currently running queues/topics. But the
objects returned by e.g. getQueues() seem to not have any statistic
information attached.
I can create a new DestinationStatistics object, but it's all empty and i
haven't found a way to "connect" it to an active ActiveMQDestination.

So please, could someone outline how to get queue statistic information NOT
using JMX and NOT running an embedded broker (i.e. using connections
provided from e.g. new
ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_USER,ActiveMQConnection.DEFAULT_PASSWORD,
"tcp://localhost:61616")) ?

thanks a lot in advance and best regards,
christian





James.Strachan wrote:
> 
> On 3/9/07, James Strachan <ja...@gmail.com> wrote:
>> On 3/9/07, Dhawan, Vikram (LNG-DAY) <vi...@lexisnexis.com> wrote:
>> > Hi,
>> > Is there a direct way using OpenWire Client API to get the number of
>> > consumers attached to a Queue at a given point of time? I know it can
>> be
>> > done using JMX API but I was wondering if it can be done using Open
>> Wire
>> > client api.
>>
>> 4.2 has a command agent...
>> http://activemq.apache.org/command-agent.html
>>
>> which can be used for sending simple text commands to the broker and
>> getting replies - such as to enquire about queue depths and the like.
>>
>> There's also advisory messages...
>> so you can listen to the operation of the broker, seeing new
>> destinations, consumers, producers etc.
>>
>> However we've never yet wrapped up a little easy API folks can use on
>> the client to easily view the available destinations and get their
>> stats etc.
>>
>> Sounds like this would be a useful addition!
> 
> I've raised a JIRA to track this
> http://issues.apache.org/activemq/browse/AMQ-1199
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/how-can-get-the-number-of-consumers-on-a-queue-tp9396153p19739420.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.