[rabbitmq-discuss] Using Pika Python client library with BlockingConnections and publisher-confirms - Does it work?
mpietrek at skytap.com
Fri Feb 3 23:49:04 GMT 2012
Just trying to figure out if this should work so that I can stop beating my
head against the wall. And apologies for posting here, but I couldn¹t find
a forum dedicated to Pika to post to.
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.
Towards this end, we're using a very simple setup using BlockingConnection,
basic_publish, basic_get and basic_ack. We're also using tx_select and
tx_confirm to guarantee messages are safely in the broker. However, given
what I've been reading, it seems like the RabbitMQ folks are strongly trying
to get folks off of transactions and on to publisher-confirms.
While I have strong concerns about message loss because of client crashes,
I'm nonetheless trying to experiment with publisher-confirms to see if they
work at all in our scenario.
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?
Given a working example (without publisher-confirms), I've modified it as
self.channel = self.connection.channel()
def write_message(self, queue_name, json_string):
print "Got the message!"
My publisher_confirm() method is never called. And by putting breakpoints at
strategic points inside the Pika client library, I don't ever see any data
coming back from the server that would result in callbacks, despite my
writing 1000s messages/sec.
Thanks for any insight folks have,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss