activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amp834 <amp...@rqinc.com>
Subject Re: How to tell if everything in a queue has been processed
Date Thu, 10 Sep 2009 15:39:35 GMT



>messages are sent to another queue to indicate that a job/message has been
processed. By sending a
message to a different queue upon completion of such processing, the client
can poll for messages on that queue and know immediately when the processing
is complete.

Thanks for the suggestions, Bruce.  I thought of doing something like that,
having a "job monitor" receive messages from a "completed" queue and update
the # of tasks that were finished.  That would add more complexity:  every
time a task has been added to the queue, I would have to update the job
monitor's database to tell it about the new task (I could, whenever I
"write" a task item to a queue, write messages to two queues, one to be
consumed by the processing machines, and one for the job monitor).  The job
monitor would have to make sure its counters are stored safely, in case of a
crash.

A simple "is the queue empty" would eliminate all of this extra traffic and
overhead!  

With the "send messages when you finish an item" method, are you thinking of
something simple that I'm not catching on to?

The net effect of what I'm trying to do is to...
submit a "job" that consists of several subtasks, the subtasks can also add
more subtasks to that job's queue, and to know when there is no subtask left
(it can send a message to an admin queue).


-- 
View this message in context: http://www.nabble.com/How-to-tell-if-everything-in-a-queue-has-been-processed-tp24887648p25385340.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message