[rabbitmq-discuss] Using pika - PRECONDITION_FAILED - unknown delivery tag 1
majek04 at gmail.com
Mon Mar 5 17:30:30 GMT 2012
On Mon, Mar 5, 2012 at 17:25, Ezequiel Golub <ezequiel.golub at gmail.com> wrote:
> Hey guys, i was wondering if any of you could lend me a hand with
> getting my rabbitmq project off the ground.
> I need to have multiple queues, with strong but not absolute
> guarantees that message will be delivered only once and redelivered if
> not ack is sent.
> I took the code examples in
> http://www.rabbitmq.com/tutorials/tutorial-two-python.html and
> modified just a little, and i'm getting the following failure after a
> number of messages are received (emphasis added):
> ---- test_consumer.py ----
> import pika, time
> def consume(ch, method, properties, body):
> print " [x] Received %r" % (body,)
> print "Sleeping for 5 seconds"
> print "Sending delivery tag = %s " % method.delivery_tag
> ch.basic_ack(delivery_tag = method.delivery_tag)
Here you send an ack.
> def main():
> connection =
> channel = connection.channel()
> channel.exchange_declare(exchange="main", type="direct",
> print "suscribing"
no_ack = True means that you don't want to send acks.
That's one possibility of your problem.
More information about the rabbitmq-discuss