[rabbitmq-discuss] Learning of the last job on queue.
kamauallan at gmail.com
Wed Apr 20 10:31:26 BST 2011
On Tue, Apr 19, 2011 at 1:13 PM, Matthew Sackman <matthew at rabbitmq.com> wrote:
> On Sun, Apr 17, 2011 at 04:10:54PM +0300, Allan Kamau wrote:
>> Is there some way of knowing of the last job processed on a now empty queue?
> No. And I don't think you want to do that either ;) - there's no
> guarantee that the last message sent out by a queue is the last message
> to arrive at a client: especially in light of things like basic.qos but
> even if that were set to 1 and you're manually acking, slow network
> links etc may mean some other client that was sent the penultimate msg
> in the queue actually receives that message a long time after the real
> last msg in the queue gets received and processed by some other client.
> That said, you may not care about these cases...
> Could you describe why you're trying to achieve this and/or what problem
> you're trying to solve?
> Best wishes,
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
Well, I need to process a batch of jobs that l may in turn generate
some results that will need to be consolidated and new jobs of similar
nature to the previous generated based on these results and so on.
It is important that all jobs be completely processed (successfully)
before the creation of the next generation of jobs.
And each such next generation job needs to be created only once (a single copy).
At this time I am looking at a simple solution by having a single
instance of an application that will do the job generation and the
monitoring of the job numbers in the job queue in RabbitMQ
periodically and generate the next round of jobs when no unprocessed
or unsuccessfully processed jobs are found. If this is possible and
suitable for the brief scenario explained above, what are the JavaAPI
commands to query the queue for job status?
More information about the rabbitmq-discuss