Python AMQP client and non-blocking sockets

We put together an add-on for py-amqplib that implements AMQP client with non-blocking sockets in python.

There are at least 2 scenarios where non-blocking sockets help, and both are applicable to consumers: 1) when you want to be able to interrupt consumer’s event loop without waiting for a next incoming message; 2) when you want to consume messages from multiple brokers (or over multiple connections) in a single event loop.

Special thanks to Barry Pederson who created py-amqplib library and made it available to the public.

Please see my announcement on rabbitmq-discuss mailing list. If your architecture still relies on custom or proprietary messaging protocols, I strongly suggest that you take a look at AMQP and especially RabbitMQ.

UPDATED: You can download the add-on directly from http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080302/455b87df/attachment.txt

UPDATED x2: If you came to this post today (2009 and beyond), please note that this add-on has been out of date for some time. Non-blocking AMQP with python can be done today with txamqp if you are using twisted, or with pika.

Categories: rabbitmq | python |

Comments (1)

[...] Samovskiy wrote about non-blocking sockets for py-amqplib on his blog. He included an add-on to support non-blocking calls for py-amqplib. This has not been merged into [...]