[rabbitmq-discuss] py-amqplib add-on: non-blocking sockets

Dmitriy Samovskiy dmitriy.samovskiy at cohesiveft.com
Sun Mar 2 22:40:29 GMT 2008

We put together an add-on for py-amqplib that implements AMQP client with non-blocking
sockets (see NonBlockingConnection class and nbloop() function in nbclient_0_8.py).
nbdemo_receive.py is a demo script, and nbclient.zip includes both nbclient_0_8.py and

There are at least 2 scenarios where non-blocking sockets help, and both are applicable to
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.

I would like to acknowledge Barry Pederson who created py-amqplib library and made it
available to the list (see his original announcement at
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2007-December/000750.html ).

- Dmitriy

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nbclient_0_8.py
Url: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080302/455b87df/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nbdemo_receive.py
Url: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080302/455b87df/attachment-0001.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nbclient.zip
Type: application/zip
Size: 4315 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080302/455b87df/attachment.zip 

More information about the rabbitmq-discuss mailing list