diff --git a/kombu/message.py b/kombu/message.py index 5f7ae525..0c5cb5d3 100644 --- a/kombu/message.py +++ b/kombu/message.py @@ -102,6 +102,13 @@ class Message(object): logger.critical("Couldn't reject %r, reason: %r", self.delivery_tag, exc, exc_info=True) + def requeue_log_error(self, logger, errors): + try: + self.requeue() + except errors as exc: + logger.critical("Couldn't requeue %r, reason: %r", + self.delivery_tag, exc, exc_info=True) + def reject(self, requeue=False): """Reject this message.