[rabbitmq-discuss] New to world of Message Queues

Adam Tauno Williams awilliam at whitemice.org
Fri Jan 13 14:54:47 GMT 2012

On Fri, 2012-01-13 at 17:56 +0330, AmirBehzad Eslami wrote:
> We have a service, where users sends code and we reply them with the answer.
> The code is sent to us via Sms, and we'll reply via SMS.
> Technically, `recv.php` running on Apache is responsible to handle
> incoming SMS messages.
> Once a SMS is recieved, we need to provide a reply for it.
> There are dozens of Reply services.
> Depending on the number which SMS is sent _TO_, a Reply service will
> be responsible to answer.
> Once a SMS is recieved (recv.php?f=XXXXXXXXXX&t=YYYY&body=Blah blah):
> 1) recv.php reads the SMS header.
> How can i use RabbitMQ in my problem? All I need is a simple queue? or
> a Job Server is better?
> What do you think about my design and its distributed architecture?
> Have you implemented something similiar?
> Please let me know your recommendations.

There are lots of devils in the details;  but me, off the top of my

1.) Make recv.php as simple as possible.  Just get the message, verify
it isn't whackadoodle, and put it into a queue.
2.) Have 1-to-n number of listeners for that queue that take the message
examine it to determine how it should be handled and place it in the
appropriate queue for the message type.
3.) Have type specific handlers listening to their approporiate queues
that work the messages and generate the responses.

I might even have the message-type processors submit their responses to
a queue with workers that send messages.

This way you can add more message-types and more processors easily.  You
can also downtime any specific component for updates/etc... and it can
pick back up when it comes back.  The latter is one of my favorite
features of message-queue based applications.

System & Network Administrator [ LPI & NCLA ]
OpenGroupware Developer <http://www.opengroupware.us>
Adam Tauno Williams

More information about the rabbitmq-discuss mailing list