You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kaustubh khasnis <ka...@gmail.com> on 2011/07/29 16:26:34 UTC

Message consumed count at broker end per unit time

HI,
Is there any way in activemq with which we can get count number of messages
consumed/produced *per second/minute at the broker end*?? I know we can get
the queue size in the broker at a given instance , but I need to know the
aggregate count for a unit time.

Thanks and regards
Kaustubh

Re: Message consumed count at broker end per unit time

Posted by kaustubh khasnis <ka...@gmail.com>.
@Yuvraj,
but still that how can I get the message rate per second. of course I can
get avarage, but I am more interested in actual number of message
consumed/produced in a given second. So I thought maybe instead of
repeatedly querying broker, if I write an interceptor, it would be better.

Also I am not very clear about how dequeue count will behave in case of
topics, Can anyone throw some light on this??

@Gary,
Thanks for the info

--Kaustubh

On Wed, Aug 3, 2011 at 10:43 AM, Yuvaraj Vanarase <
yuvaraj.vanarase@synechron.com> wrote:

> Well, if you ready to process command output, you can use activemq-admin
> utility. By using 'query' option one can find various statistics about
> broker/queue.
>
>
>
> Here is an example output, using enqueue/dequeue counts one can find the
> rate may be per second or minute, whatever:
>
>
>
>
>
> D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin>activemq-admin query
> -QQueue=SAMPLE.JMS.QUEUE
>
> Java Runtime: Sun Microsystems Inc. 1.6.0_20
> D:\INSTALLED\Java\jdk1.6.0_20\jre
>
>  Heap sizes: current=61312k  free=60669k  max=910272k
>
>    JVM args:
> -Dactivemq.classpath=D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\../conf;
> -Dactivemq.home=D:\INSTALLED
>
> \ApacheMQ\apache-activemq-5.4.1\bin\..
> -Dactivemq.base=D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\..
>
> ACTIVEMQ_HOME: D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\..
>
> ACTIVEMQ_BASE: D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\..
>
> Connecting to pid: 4680
>
> DequeueCount = 0
>
> Name = SAMPLE.JMS.QUEUE
>
> MinEnqueueTime = 0
>
> CursorMemoryUsage = 289700
>
> MaxAuditDepth = 2048
>
> Destination = SAMPLE.JMS.QUEUE
>
> AverageEnqueueTime = 0.0
>
> InFlightCount = 0
>
> MemoryLimit = 10485760
>
> Type = Queue
>
> EnqueueCount = 0
>
> MaxEnqueueTime = 0
>
> MemoryUsagePortion = 0.0
>
> ProducerCount = 0
>
> UseCache = true
>
> BlockedProducerWarningInterval = 30000
>
> MaxProducersToAudit = 32
>
> CursorFull = false
>
> BrokerName = localhost
>
> PrioritizedMessages = false
>
> ConsumerCount = 0
>
> ProducerFlowControl = false
>
> Subscriptions = []
>
> QueueSize = 3434
>
> MaxPageSize = 200
>
> CursorPercentUsage = 2
>
> DispatchCount = 0
>
> MemoryPercentUsage = 2
>
> ExpiredCount = 0
>
>
>
>
>
> Regards,
>
> Yuvaraj
>
>
>
> Yuvaraj Vanarase,
>
> Lead Technology - Software
>
> Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 |
> http://www.synechron.com
>
> SYNECHRON -
>
> - Top 10 Best IT Employers for 4 consecutive years (link).
>
> - Celebrating 10 Years!
>
>
>
> -----Original Message-----
> From: kaustubh khasnis [mailto:kaustubh.khasnis@gmail.com]
> Sent: Friday, July 29, 2011 7:57 PM
> To: users@activemq.apache.org
> Subject: Message consumed count at broker end per unit time
>
>
>
> HI,
>
> Is there any way in activemq with which we can get count number of messages
>
> consumed/produced *per second/minute at the broker end*?? I know we can get
>
> the queue size in the broker at a given instance , but I need to know the
>
> aggregate count for a unit time.
>
>
>
> Thanks and regards
>
> Kaustubh
>

RE: Message consumed count at broker end per unit time

Posted by Yuvaraj Vanarase <yu...@synechron.com>.
Well, if you ready to process command output, you can use activemq-admin utility. By using 'query' option one can find various statistics about broker/queue.



Here is an example output, using enqueue/dequeue counts one can find the rate may be per second or minute, whatever:





D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin>activemq-admin query -QQueue=SAMPLE.JMS.QUEUE

Java Runtime: Sun Microsystems Inc. 1.6.0_20 D:\INSTALLED\Java\jdk1.6.0_20\jre

  Heap sizes: current=61312k  free=60669k  max=910272k

    JVM args: -Dactivemq.classpath=D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\../conf; -Dactivemq.home=D:\INSTALLED

\ApacheMQ\apache-activemq-5.4.1\bin\.. -Dactivemq.base=D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\..

ACTIVEMQ_HOME: D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\..

ACTIVEMQ_BASE: D:\INSTALLED\ApacheMQ\apache-activemq-5.4.1\bin\..

Connecting to pid: 4680

DequeueCount = 0

Name = SAMPLE.JMS.QUEUE

MinEnqueueTime = 0

CursorMemoryUsage = 289700

MaxAuditDepth = 2048

Destination = SAMPLE.JMS.QUEUE

AverageEnqueueTime = 0.0

InFlightCount = 0

MemoryLimit = 10485760

Type = Queue

EnqueueCount = 0

MaxEnqueueTime = 0

MemoryUsagePortion = 0.0

ProducerCount = 0

UseCache = true

BlockedProducerWarningInterval = 30000

MaxProducersToAudit = 32

CursorFull = false

BrokerName = localhost

PrioritizedMessages = false

ConsumerCount = 0

ProducerFlowControl = false

Subscriptions = []

QueueSize = 3434

MaxPageSize = 200

CursorPercentUsage = 2

DispatchCount = 0

MemoryPercentUsage = 2

ExpiredCount = 0





Regards,

Yuvaraj



Yuvaraj Vanarase,

Lead Technology - Software

Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com

SYNECHRON -

- Top 10 Best IT Employers for 4 consecutive years (link).

- Celebrating 10 Years!



-----Original Message-----
From: kaustubh khasnis [mailto:kaustubh.khasnis@gmail.com]
Sent: Friday, July 29, 2011 7:57 PM
To: users@activemq.apache.org
Subject: Message consumed count at broker end per unit time



HI,

Is there any way in activemq with which we can get count number of messages

consumed/produced *per second/minute at the broker end*?? I know we can get

the queue size in the broker at a given instance , but I need to know the

aggregate count for a unit time.



Thanks and regards

Kaustubh

Re: Message consumed count at broker end per unit time

Posted by Gary Tully <ga...@gmail.com>.
The messageconsumed/messagedelivered are used for advisory support and
their use is conditional on the destination policy attributes,
advisoryForConsumed and advisoryForDelivery, by default they are
false.

On 1 August 2011 17:06, kaustubh khasnis <ka...@gmail.com> wrote:
> Hi,
> Thanks for the reply, I instead chose to write a broker plugin which will
> keep on calculating the stats and send to a central server. The counters I
> am increamenting in send method and postProcessDispatch method. somehow It
> looks like messageconsumed and messagedelivered methods are not being called
> at all? Do you know the reason behind this?
>
> --Kaustubh
>
>
> On Mon, Aug 1, 2011 at 1:57 PM, Torsten Mielke <to...@fusesource.com>wrote:
>
>> I am afraid there is no JMX MBean or other plugin that calculates the
>> amount of msgs consumed/produced per second.
>> It should not be too difficult to write a little tool yourself, you simply
>> need to query the queues JMX properties at fixed intervals and then
>> calculate the rate per second.
>>
>>
>> Torsten Mielke
>> torsten@fusesource.com
>> tmielke@blogspot.com
>>
>>
>>
>>
>



-- 
http://fusesource.com
http://blog.garytully.com

Re: Message consumed count at broker end per unit time

Posted by kaustubh khasnis <ka...@gmail.com>.
Hi,
Thanks for the reply, I instead chose to write a broker plugin which will
keep on calculating the stats and send to a central server. The counters I
am increamenting in send method and postProcessDispatch method. somehow It
looks like messageconsumed and messagedelivered methods are not being called
at all? Do you know the reason behind this?

--Kaustubh


On Mon, Aug 1, 2011 at 1:57 PM, Torsten Mielke <to...@fusesource.com>wrote:

> I am afraid there is no JMX MBean or other plugin that calculates the
> amount of msgs consumed/produced per second.
> It should not be too difficult to write a little tool yourself, you simply
> need to query the queues JMX properties at fixed intervals and then
> calculate the rate per second.
>
>
> Torsten Mielke
> torsten@fusesource.com
> tmielke@blogspot.com
>
>
>
>

Re: Message consumed count at broker end per unit time

Posted by Torsten Mielke <to...@fusesource.com>.
I am afraid there is no JMX MBean or other plugin that calculates the amount of msgs consumed/produced per second.
It should not be too difficult to write a little tool yourself, you simply need to query the queues JMX properties at fixed intervals and then calculate the rate per second. 


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com