Skip to main content

Posts

Showing posts from August, 2010

Looks like Google voice is going to compete big time with Skype

When skype call was launched it was free for the remaining part of the year  and now google voice is introducing free calls for the year for US and canada. I just tried the call quality from my ubuntu and it rocks. Here is how it looks like in my gmail

RabbitMQ synchronously consume messages

In my previous post I had described a scenario to synchronously consuming message from RabbitMQ. Here is a way to do it in python.To make things simple to understand I just wrote a dummy program that dumps the content of a RabbitMQ queue and then you can use the same program to remove a message also from queue by iterating all messages and acknowledging it. (its a dumb implementation so dont judge the coding, the intent is to demonstrate synchronous consumption of queue contents). import sys from amqplib import client_0_8 as amqp messageIdToRemove = None chan = None def process_message(msg): print "=================================================" print "Properties =" print msg.properties print "Body=" print msg.body if op == "remove_message": if messageIdToRemove == msg.properties['message_id']: print "@@@@@@removing message@@@@@@@@@@@@@@@@@@" chan.basic_ack(msg.del...

RabbitMQ retrying failed messages

We are a Hybrid cloud file server company and recently we had a requirement where we had to allow users to View a file with Google docs and upon saving the file in Google docs we need to download the file back and create a version in Cloud file server. Upon saving the file in google docs we insert a message in rabbitMQ from app nodes and then a background GoogleDocs consumer process pulls the file and create a version using REST api of the cloud file server. As there are many components involved here there can be multiple failure scenarios from Google throttling us, to appservers going down for maintenance, to app servers throttling the background jobs if they are under heavy load.  The problem with rabbitMQ is that once a message is delivered to the consumer even if the consumer doesn't acknowledges it, RabbitMQ won't redeliver the unacked message to consumers until the channel is properly closed and reopened.  I tried checking rabbit transactions api to rollback the transa...