Member-only story

Retrying Failed Messages In A Symfony Application

İbrahim Gündüz
3 min readMay 2, 2020

--

Sometimes, a message consumer might be failed because of connection issues or other logical reasons. In this case, the application should handle the fail scenario properly and retry the failed message several times based on some rules.

Today, we are gonna see how to retry a failed message in a Symfony application through Messenger Component by referencing the previous post:

https://medium.com/@ibrahimgunduz34/using-rabbitmq-in-a-symfony-application-through-messenger-component-e61498b668b

How To Retry

Messenger Component, retries a failed message through the dead letter feature of RabbitMQ in case of RabbitMQ usage. It tries by default 3 times, with 1000 ms delay, and multiplies the duration by 2 in each try.

RabbitMQ deliver the messages with a specific delay when it received some headers as the following:

You can check out the document for more details regarding dead lettering

--

--

No responses yet