[rabbitmq-discuss] (Lightweight) Publisher Confirms with the pika Python client

Mark Aufflick mark-erlang at aufflick.com
Mon Feb 21 22:42:24 GMT 2011

Hi all,

I have seen reference in passing on this list that all clients (except the C
client) support the lightweight publisher confirms (ie.

I can't quite work out what this means in terms of using the Python pika
client. Firstly, creating a channel like so:

parameters = pika.ConnectionParameters('foo')
connection = BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue='test', durable=True,
                     exclusive=False, auto_delete=False)

I'm then not sure how to put it into confirm mode. The java api seems to
have a selectConfirm() method that I don't see in the pika docs or source.

Once I have been able to put the channel into confirm mode, I then somehow
need to set the ack and nack callbacks. I see the channel.add_callback()
method, but the auto-generated (I'm guessing) docs are fairly opaque.

Hoping someone can shed some light on this? I'm also wondering if there is
an easy way to do a blocking publish that waits for the ack/nack and returns


Mark Aufflick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110222/764c0415/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list