Python client for the Advanced Message Queuing Procotol (AMQP)
Implements a simple non-threaded client library for AMQP 0-8, tested with RabbitMQ.
I was looking for something that could be used in an embedded Python environment (py-exim-localscan), in which case reliance on threading would probably cause trouble.
A quick connection time was desirable too. QPID takes a while to parse the AMQP spec file. For this module, I generated a skeleton statically from the 0-8 spec file, and fleshed it out by hand.
Also features SSL support (tested against RabbitMQ behind a Stunnel)
See also: py-amqplib on the Cheeseshop, Apache QPID, txAMQP for Twisted Python
Reworked some key parts of the library to do-the-right-thing when receiving various messages from an AMQP server. Now compatible with Python 2.4. Did some profiling and found a big time-waster, ran pylint and fixed some minor coding problems. Added an experimental non-blocking client.
Updated to include much more information from the AMQP spec file in the Python docstrings. Updated a few methods to have default values for queue and exchange names where possible.
Change the Channel.exchange_declare and Channel.queue_declare methods to have the auto_delete parameter default to True instead of False. Not deleting a queue is a good way to cause your AMQP server to consume tons of memory - if a program really wants to keep a queue around after it exits, it should explicitly say so.
Improved the client library to support redirections. A test script was added to simulate a redirecting AMQP server, and the unittests were run against that.
To install, download the tarball and execute:
tar xzvf amqplib-0.1.tgz
cd amqplib-0.1
python setup.py install
or, if you have easy_install, you can just run:
easy_install amqplib