I have a Redis queue, constantly filling up from a "Manager" and then multiple workers handling the messages. Each worker is in a separate pod (k8s).
Currently, I have delete_after_ack
set to true
and messages get deleted when they get picked up.
However, at specific times, a worker picks up a message from the queue, but the pod (or worker process) gets killed due to some reason (upgrade, restart, etc.). At that point, the message gets deleted from the queue, the job is not properly finished and needs to retry, but it will never be added to the queue again.
How do you handle this situation? When I remove delete_after_ack
, all the messages stay in the queue forever. How do you tell Symfony/Redis to delete the message only when the worker finished successfully ? And how do you make the message retry if it was received, but not completed in a set amount of time?