[rabbitmq-discuss] AMQP & Python Write-Up
Gordon Sim
gsim at redhat.com
Wed Jan 14 13:39:16 GMT 2009
Jason J. W. Williams wrote:
> I've written up a quick start on the basics of AMQP and using it in
> Python, that is the kind of document I wished I'd been able to find in
> one place: http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/
>
> It's probably laced with errors, and I'd appreciate any
> feedback/corrections.
Nice article!
I am not that familiar with py-amqplib but the no_ack argument to
basic_consume/basic_get is defined in the AMQP spec to mean that the
server should not expect an ack and should discard the message on
delivery. I.e. its an unreliable mode of delivery[1] rather than a
signal to the client library to automatically acknowledge on receiving a
message.
One simplification that I think is sometimes nice to mention is using
the 'default exchange' to emulate publishing directly to a queue. E.g.
chan.basic_publish(msg,routing_key="po_box")
It avoids the need to explicitly bind a queue in situations where
fancier routing is not required.
[1] This makes sense for example if you have a private queue bound to an
exchange as a 'subscription' to published events. If your client fails
the queue will disappear, so acking is not adding anything.
More information about the rabbitmq-discuss
mailing list