activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: Total number of messages on a queue.
Date Mon, 18 Aug 2008 18:00:46 GMT
On Sun, Aug 17, 2008 at 11:26 PM, Jigar Naik <jigarnaik@interactcrm.com> wrote:
>
> Hi,
>
> is it possible to get a count of total number of messages in a queue ?
>
> I want to do something like if the count exceed some limit than only start
> processing.

You an get a queue count via the use of JMX. I've provided an example
of this previously and it is available as an attachment on the
following discussion:

http://markmail.org/search/?q=activemq%20amqjmxexampletest#query:activemq%20amqjmxexampletest+page:1+mid:us7q7dgdinp2sfo6+state:results

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Mime
View raw message