[rabbitmq-discuss] How to implement consumer's sequential work correctly?
Tim Watson
tim at rabbitmq.com
Thu Mar 28 15:45:07 GMT 2013
Hi
On 26 Mar 2013, at 16:20, Karlen Kishmiryan wrote:
> Hello,
> Here are three steps I want to do:
> • pull some file names and pass them to the downloader (first consumer)
> • AFTER downloading each file pass them to the extracter (second consumer)
> • AFTER extracting pass them to the Inserter (third consumer) to push the data into DB
> Now I would like to know how I will manage these "AFTER"s.
> As I understand there are two solutions:
> • each consumer must send the message to the producer back about success or failure of the task. If it's done successfully, then producer must send to the next consumer.
That's the RPC style - as in http://www.rabbitmq.com/tutorials/tutorial-six-python.html
> • each consumer must put the message to the next consumer's queue when it's done
That should also work fine. If you've been able to publish to one queue, then you should be able to publish to another one eh!?
> Actually I don't know how to realize both of them.
Have you read the tutorials at http://www.rabbitmq.com/getstarted.html yet? That's a good place to start, after which http://www.rabbitmq.com/documentation.html and http://www.rabbitmq.com/clients.html might be a good follow-on.
More information about the rabbitmq-discuss
mailing list