Merge pull request #281 from TelekomLabs/log_decode_errors

log decode errors, do not ack.
This commit is contained in:
anujm 2014-03-14 15:56:43 +05:30
commit 9d1a93a49e

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