log decode errors, do not ack.

This commit is contained in:
Bernhard K. Weisshuhn 2014-03-14 10:34:48 +01:00
parent 1c7cbab784
commit 4f60f245cf
1 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,10 @@ class Consumer(kombu.mixins.ConsumerMixin):
_get_child_logger().error("RabbitMQ Broker connection error: %r. "
"Trying again in %s seconds.", exc, interval)
def on_decode_error(self, message, exc):
_get_child_logger().exception("Decode Error: %s" % exc)
# do NOT call message.ack(), otherwise the message will be lost
def continue_running():
return not shutdown_soon