[rabbitmq-discuss] pika basic_ack dying

Stephen Young stephen.t.young at gmail.com
Fri Sep 23 00:38:17 BST 2011


I tried posting this before and hit an error (i think) so sorry if it
is a repost...

I'm using rabbitmq with a single exchange and multiple queues, and
many servers each monitoring all queues.

When i start the servers monitoring clean (empty) queues, basic_ack
works fine and they process anything new that comes in. Any queues
with pre-existing data won't accept a basic_ack (or the channel
doesn't send it, I'm not sure how to debug this..?) and hangs after
processing the first item. I'm using a qos of 1 for testing purposes.

I'm handling the queues with multiprocessing, so I pass the
_onComplete callback to resolve the queue...

========================================================
def _onComplete():
    self.channel.basic_ack(delivery_tag=method.delivery_tag)
    print "Sent delivery tag %s via %s" %
(method.delivery_tag,channel)

kwargs = {
    'data': message['data'],
    'oncomplete': _onComplete,
}

p = Process(target=self._registry(message['key']),
args=[],kwargs=kwargs)
p.start()
========================================================

Not sure if the problem is clear, hopefully someone can shed some
light on why it happens though


More information about the rabbitmq-discuss mailing list