RED-4653: Added re-raising of a caught exception druing message processing to prevent infinite re-tries

This commit is contained in:
Viktor Seifert 2022-07-18 14:02:35 +02:00
parent 33b26527dc
commit ebbaf6f05b

View File

@ -82,7 +82,8 @@ class QueueManager(object):
self._channel.basic_ack(frame.delivery_tag)
except Exception as ex:
n_attempts = _get_n_previous_attempts(properties) + 1
logger.warning(f"Message failed to process, {n_attempts} attempts, error {str(ex)}: message: {body}")
logger.warning(f"Failed to process message, {n_attempts} attempts, error: {str(ex)}")
raise ex
return callback