On 9 Aug 2009, at 15:32, amp834 wrote:
I'm using ActiveMQ to "Submit a job" to queue "Job53" (a queue for
each job),
with (say) 500 subtasks, and want to know when the 500 items have been
processed completely. I thought of creating a queue just for that
job,
writing 500 messages to it, and when the 500 messages have been
processed,
the job is done.
Is there a way to tell if a queue is empty? (no messages in the
queue, no
messages that a consumer has taken but has not finished processing)?
I found an old post, but it's so old that I thought I'd ask the
question
again.
http://www.nabble.com/Query-the-number-of-messages-from-a-Queue-to3652780.html#a3653404
--
View this message in context:
http://www.nabble.com/How-to-tell-if-everything-in-a-queue-has-been-processed-tp24887648p24887648.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
You can either use JMX - as the old post suggested - or enable message
consumed advisory - to get informed out when a message has been
consumed from the queue - see http://activemq.apache.org/advisory-message.html
cheers,
Rob
Rob Davies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/