ask/kombu — Issue #73: KeyError when acknowledging message in SQS
Author: Bernie
Created: 2011-10-18 14:12:08+00:00
State: open

When attempting to use SQS with celery, I am recieving this error and stack trace when celery attempts to acknowledge a message:

Pool callback raised exception: Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/celery/concurrency/base.py", line 113, in safe_apply_callback
fun(*args)
File "/usr/lib/pymodules/python2.7/celery/worker/job.py", line 458, in on_success
self.acknowledge()
File "/usr/lib/pymodules/python2.7/celery/worker/job.py", line 523, in acknowledge
self.on_ack()
File "/usr/lib/pymodules/python2.7/celery/worker/consumer.py", line 398, in ack
message.ack()
File "/usr/lib/pymodules/python2.7/kombu/transport/base.py", line 106, in ack
self.channel.basic_ack(self.delivery_tag)
File "/usr/lib/pymodules/python2.7/kombu/transport/SQS.py", line 229, in basic_ack
delivery_info = self.qos.get(delivery_tag).delivery_info
File "/usr/lib/pymodules/python2.7/kombu/transport/virtual/__init__.py", line 109, in get
return self._delivered[delivery_tag]
KeyError: 1

This occurs frequently (with different delivery_tags). I think messages are not being deleted off of the queue due to this error.

I am using kombu version 1.2.1.