From 94648cc449bbc392864197a1796f99f8953b7312 Mon Sep 17 00:00:00 2001 From: Viktor Seifert Date: Tue, 26 Jul 2022 10:50:42 +0200 Subject: [PATCH] RED-4653: Changed error case for processing messages to not requeue the message since that will be handled in DLQ logic --- pyinfra/queue/queue_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyinfra/queue/queue_manager.py b/pyinfra/queue/queue_manager.py index 879e779..17a7ada 100644 --- a/pyinfra/queue/queue_manager.py +++ b/pyinfra/queue/queue_manager.py @@ -98,6 +98,7 @@ class QueueManager(object): except Exception as ex: n_attempts = _get_n_previous_attempts(properties) + 1 self.logger.warning(f"Failed to process message, {n_attempts} attempts, error: {str(ex)}") + self._channel.basic_nack(frame.delivery_tag, requeue=False) raise ex return callback