[rabbitmq-discuss] is RabbitMQ for me ?

bino oetomo bino at indoakses-online.com
Mon May 14 05:16:05 BST 2012


Dear All ...
This is my first time jump to the MQ world.

I'm building a Fleet Telemtry system.
Since it's a 'Fleet', there is a time that my system will got network 
connection, and there is a time where my system in 'blank area'.

What I'm thinking is :
1. Build a telemetry loger that will always write the log to MQ
2. Build MQ 'Task worker' will process each stored Message. The process 
HTTP POST, and :
a. IF Success : Delete the task from MQ,
b. IF Failed : Leave the Task untouched

The MQ database have to be Persistance, so that if my system shutted 
down .. it'll proceed the next time it's started-up.

My programming language is Python

Question :
1. Is Rabbit MQ for me ?
2. If So, I read 
http://www.rabbitmq.com/tutorials/tutorial-one-python.html , so I'll use 
PIKA as pythin library.
How to tell RabbitMQ (using PIKA) that the Task is Done (and delete the 
task) ?
How to tell RabbitMQ (using PIKA) that the HTTP POST is failed and just 
leave the Task untouched ?

Is it just like ( adopted from the last code at 
http://www.rabbitmq.com/tutorials/tutorial-two-python.html ) :
----START----
def callback(ch, method, properties, body):
     print " [x] Received %r" % (body,)
     time.sleep( body.count('.') )
     welldonne = True
     try :
         do httppos
     except :
         welldone = False

     if welldone :
         ch.basic_ack(delivery_tag = method.delivery_tag)
     else
         ch.basic_ack(delivery_tag = False)
----STOP-----

Kindly please give me your enlightment.

Sincerely
-bino-



More information about the rabbitmq-discuss mailing list