[rabbitmq-discuss] Send message and wait for ACK for X seconds

Matthieu Napoli matthieu at mnapoli.fr
Tue Sep 17 11:09:49 BST 2013


I have a basic work queue, and some work tasks are very fast. I can't 
predict whether a task will take 0.1s or 10min.

What I'd like to do is have the producer (HTTP web request) send a job to a 
worker, and wait for 3 seconds. If the job is done by then, then I can 
display "OK" to the user, else I stop waiting and I display "It will be 
effective soon".

A way to do this is using a RPC-style, bidirectional communication. That's 
unnecessarily complex because I don't need the result of the job.

Another way would be to simply wait for the ACK of the worker (task 
completed).

So my question: is there a way to wait for the ACK of a message (i.e. 
consumer finished processing it) on the producer side?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130917/b6f27d6f/attachment.htm>


More information about the rabbitmq-discuss mailing list