From 4f60f245cf55f22b265b1eb2620ea455b2ebeabe Mon Sep 17 00:00:00 2001 From: "Bernhard K. Weisshuhn" Date: Fri, 14 Mar 2014 10:34:48 +0100 Subject: [PATCH] log decode errors, do not ack. --- worker/worker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worker/worker.py b/worker/worker.py index ae6fbaa..d14d793 100644 --- a/worker/worker.py +++ b/worker/worker.py @@ -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