[rabbitmq-discuss] Architecture Question for webservice

Jonathan Stott jonathan.stott at gmail.com
Tue Mar 23 13:31:20 GMT 2010


Hi all

I'm setting up a simple webservice.  Since it involves quite a few file operations and some potentially long running tasks, I want those tasks handled by a separate process (or potentially, processes).  This also lets me separate concerns.  So I want to use rabbitmq to communicate between the two (and handle the mechanics of queueing jobs).

The job submission side is easy.  I route messages to a queue the worker(s) is subscribed to.  It pulls the jobs off the queue, does the work.  But what if I want to send back a confirmation?  The obvious way is to set up a queue to route back messages to the front end process.  I can even send a 'return to' 'address' along with the job.

My question is:  How many queues do I need to send back to?

If I have one queue for the return messages, then how do I split out different job outputs from the stream? so that I send correct status reports to each client.

But if each job has the webservice setup a queue just to listen for the reply, I'll be setting up and tearing down queues all the time.

So which way would people recommend or am I thinking about this the wrong way?  Is there an option I've missed?  Is there something which would fit better than rabbit?

Regards
Jon




More information about the rabbitmq-discuss mailing list