[rabbitmq-discuss] Using Pika Python client library with BlockingConnections and publisher-confirms - Does it work?

Ask Solem ask at rabbitmq.com
Sat Feb 4 11:56:53 GMT 2012


On 3 Feb 2012, at 23:49, Matt Pietrek wrote:

> 
> Our app is such that the asynchronous processing model doesn't work for us. We want to reliably pull one message at a time off the queue, process it, acknowledge it, and be done with it.
> 
[...]
> And this is where I hit the wall. I can't get publisher-confirm callbacks to work. The callback is never called. Is this expected to work?


AFAIK for publisher confirms to work you would need to drain events from
the connection.  Currently you are just writing data to the socket, and never
reading the replies back, so the callback won't be triggered.

Now, actually draining events while publishing messages is tricky in a blocking
application, you would have to find some smart way of alternating between reading
and writing to the socket.  Maybe there are mechanisms in pika for this, but I don't know.


More information about the rabbitmq-discuss mailing list