On worker OOM, Remoulade thinks message has not been tried.
So, Retries middleware won't tag it and user max_retries argument won't be respected.
Idea:
Use RabbitMQ 'redelivered' tag to handle this case.
If tag is set to True, start to count the number of tries for a given message with Redis.
If message successes, remove the Redis key.
If counter reaches a limit (max_retries value ?), raise an error
See https://www.rabbitmq.com/consumers.html#message-properties
On worker OOM, Remoulade thinks message has not been tried.
So, Retries middleware won't tag it and user max_retries argument won't be respected.
Idea:
Use RabbitMQ 'redelivered' tag to handle this case.
If tag is set to True, start to count the number of tries for a given message with Redis.
If message successes, remove the Redis key.
If counter reaches a limit (max_retries value ?), raise an error
See https://www.rabbitmq.com/consumers.html#message-properties