Thanks Jason,

I am trying to know if there is way to create and register some listener to 
Broker so that Broker will callback some method on listener when queue becomes 
empty on broker. In this way, client doesn't have to poll queue to know if all 
messages are consumed.
Well, I do also think it may not happening that Broker itself knows when queue 
becomes empty, then above requirement is nonsense. In this case is the 
polling/checking queue messages  remaining is the solution?

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: Jason Whaley [mailto:jasonwha...@gmail.com] 
Sent: Wednesday, June 15, 2011 8:07 PM
To: users@activemq.apache.org
Subject: Re: Detect empty Queue programmatically

I'm not sure if by saying "I do not want to poll the queue to see remaining
messages" means you are ruling out polling JMX also, but you could very well
monitor a Queue's QueueSize attribute via JMX and take action when it is 0.


Here's a link to at least setting up JMX on the broker with some other
details http://activemq.apache.org/jmx.html .

On Tue, Jun 14, 2011 at 10:54 PM, Yuvaraj Vanarase <
yuvaraj.vanar...@synechron.com> wrote:

> Hi,
>
> I would like to fire some sql query when all messages are processed from
> Queue ie. Queue becomes empty. I do not want to poll the queue to see
> remaining messages. Is there any way by which activemq will deliever an
> event to some listener? Like we have advisory message listener.
>
> 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<
> http://www.synechron.com/news/news_best_employer_sep2010.htm>).
> - Celebrating 10 Years!
>
>

Reply via email to