You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nkiesel <nk...@tbdnetworks.com> on 2006/08/22 23:45:03 UTC

how to get #items in a queue?

I am looking for an example how to get e.g. #items in a queue from within my
Java program. I know how to look at it using e.g. jconsole, but I want to
display some stats about existing queues using a JSP.  So other info I will
need is a list of all queues, but this I think I can figure out myself
(although I would of course be very grateful for info on this as well).

>From the FAQ "How do I find the size of a Queue" I clicked down to "How can
I see what destinations are used". But that only talks about how to get a
list of all active destinations.  The link provided points to the Java API
doc that does not give any methods for getting statistics (or, more likely,
I'm missing something here).

Best,
  Norbert


-- 
View this message in context: http://www.nabble.com/how-to-get--items-in-a-queue--tf2148920.html#a5934254
Sent from the ActiveMQ - User forum at Nabble.com.


Re: how to get #items in a queue?

Posted by James Strachan <ja...@gmail.com>.
On 8/22/06, nkiesel <nk...@tbdnetworks.com> wrote:
>
> I am looking for an example how to get e.g. #items in a queue from within my
> Java program. I know how to look at it using e.g. jconsole, but I want to
> display some stats about existing queues using a JSP.

Try use JMX to query the MBeans.

Or try use the web console which does this from a local in-JVM broker currently
http://incubator.apache.org/activemq/web-console.html


> So other info I will
> need is a list of all queues, but this I think I can figure out myself
> (although I would of course be very grateful for info on this as well).
>
> From the FAQ "How do I find the size of a Queue" I clicked down to "How can
> I see what destinations are used". But that only talks about how to get a
> list of all active destinations.  The link provided points to the Java API
> doc that does not give any methods for getting statistics (or, more likely,
> I'm missing something here).

The statistics are all in the MBeans
-- 

James
-------
http://radio.weblogs.com/0112098/