Put out a new release of py-amqplib, labeled 0.5, featuring the reworking mentioned earlier of how frames from the server are handled, and a big speed-improvement in receiving messages that was prompted by doing some profiling after reading Initial Queuing Experiments on the Second p0st blog.
posted: Monday, 04 August 2008 23:30 | tags: amqp python
#2 tsuraan commented, on September 22, 2008 at 10:17 a.m.:
I couldn't find your bug tracker, so I'll just post here. I'm not sure if you're targetting python 2.4 at all, but if you are, the definition of AMQPException doesn't work. Python 2.4 exceptions don't inherit from object, so you can't do super(MyClass, self) on classes inheriting from Exception. In my copy of py-amqplib, I've changed the initializer so it says the following:
if map(int, sys.version.split()[0].split('.')) >= [2,5,0]:
__super(AMQPException, self).__init__()
else:
__Exception.__init__(self)
(sorry about the underscores; your comment system doesn't have an obvious way to preserve whitespace)
That makes it valid for 2.4 and good for 2.5. Not sure if you want to fold that in, but I thought I'd post my change.
#4 barryp commented, on September 22, 2008 at 7:24 p.m.:
Michael Kelly:
I talked a bit about why I tackled this back in this blog post:
http://barryp.org/blog/entries/amqp/
I couldn't say exactly how long it took, if I had to make a wild guess I'd say maybe 15 hours to get to the 0.1 stage and another 25 hours since then, but that's spread over many days just working a little here and there.
#5 Domingo Aguilera commented, on October 13, 2008 at 9:50 p.m.:
Barry I have installed 0.5.
tests run ok vs a local rabbitmq.
I don't understand how can I run the files in the demo directory.
I tried every one, but got no output, rabbitmq log file report activity ( tcp connection and disconnection ).
Any hint?
Tks.
Domingo.
twitter : twitter.com/batok
#6 barryp commented, on October 14, 2008 at 11:14 a.m.:
After installing py-amqplib (by running "python setup.py install") I run it like this...
In one window, I
cd py-amqplib/demo
./demo_receive.py --host=10.66.0.8
in a second window
cd py-amqplib/demo
./demo_send.py --host=10.66.0.8 hello
back in the first window (running demo_receive.py), I then see
application_headers: {u'foo': 7, u'bar': 'baz'}
content_type: text/plain
> exchange: myfan
> consumer_tag: amq.ctag-ZSakFMRV+YXvdlQ1/DyZ4A==
> routing_key:
> redelivered: False
> delivery_tag: 1
> channel: <amqplib.client_0_8.Channel object at 0x801763710>
hello
-------
That should be it. If you leave off the --host=xxx argument, it defaults to "localhost"
Barry
#1 Michael Kelley commented, on August 25, 2008 at 1:02 p.m.:
I just wanted to say thanks for putting this library out there in the first place. What prompted you to write it? About how long did it take?