You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Norman Maurer <no...@apache.org> on 2010/03/16 08:36:01 UTC

Get size of queue

Hi all,

is it somehow possible to get the exact number of items in a queue
with the jms api ? It would be also nice to be able to check the size
of items with a given selector..

So any idea?

Thx,
Norman

Re: Get size of queue

Posted by Norman Maurer <no...@googlemail.com>.
Hi Bruce,

we used the camel activemq component and use a selector, which works
without probs.. So thats not the problem ;)

Thx,
Norman


2010/3/16 Bruce Snyder <br...@gmail.com>:
> On Tue, Mar 16, 2010 at 7:20 AM, Norman Maurer
> <no...@googlemail.com> wrote:
>> Hi Bruce,
>>
>> we use ActiveMQ for storing our outgoing emails in JAMES
>> (james.apache.org). The emails are consumed via a JMS Selector on a
>> given time (for retry after temporary error). This will prolly be
>> changed once ActiveMQ 5.4 was released with its delay feature ;)
>>
>> Now we want to give the administrator some kind of feedback how many
>> emails are in the queue etc.
>
> You could implement a delay feature with ActiveMQ by using Camel's
> timer component.
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
>

Re: Get size of queue

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, Mar 16, 2010 at 7:20 AM, Norman Maurer
<no...@googlemail.com> wrote:
> Hi Bruce,
>
> we use ActiveMQ for storing our outgoing emails in JAMES
> (james.apache.org). The emails are consumed via a JMS Selector on a
> given time (for retry after temporary error). This will prolly be
> changed once ActiveMQ 5.4 was released with its delay feature ;)
>
> Now we want to give the administrator some kind of feedback how many
> emails are in the queue etc.

You could implement a delay feature with ActiveMQ by using Camel's
timer component.

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

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: Get size of queue

Posted by Norman Maurer <no...@googlemail.com>.
Hi Bruce,

we use ActiveMQ for storing our outgoing emails in JAMES
(james.apache.org). The emails are consumed via a JMS Selector on a
given time (for retry after temporary error). This will prolly be
changed once ActiveMQ 5.4 was released with its delay feature ;)

Now we want to give the administrator some kind of feedback how many
emails are in the queue etc.

Bye,
Norman

2010/3/16 Bruce Snyder <br...@gmail.com>:
> On Tue, Mar 16, 2010 at 1:36 AM, Norman Maurer <no...@apache.org> wrote:
>> Hi all,
>>
>> is it somehow possible to get the exact number of items in a queue
>> with the jms api ? It would be also nice to be able to check the size
>> of items with a given selector..
>>
>> So any idea?
>
> APIs are available for this via JMX. However, that number is only good
> for that exact second in time. This is just the nature of JMS because
> messages are flowing through the system constantly. Why do you need
> the queue size?
>
> Bruce
> --
> perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
>

Re: Get size of queue

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, Mar 16, 2010 at 1:36 AM, Norman Maurer <no...@apache.org> wrote:
> Hi all,
>
> is it somehow possible to get the exact number of items in a queue
> with the jms api ? It would be also nice to be able to check the size
> of items with a given selector..
>
> So any idea?

APIs are available for this via JMX. However, that number is only good
for that exact second in time. This is just the nature of JMS because
messages are flowing through the system constantly. Why do you need
the queue size?

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

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder