messenger-retry-failures
Installation
SKILL.md
Messenger Retry Failures (Symfony)
Use when
- A handler fails and you must decide between retrying and giving up.
- Tuning
retry_strategy(max_retries,delay,multiplier,max_delay) for a transport. - Inspecting, retrying, or removing messages in the failure transport.
- Alerting when a message fails for good.
Default workflow
- Classify each failure:
UnrecoverableMessageHandlingExceptionwhen retrying cannot help,RecoverableMessageHandlingExceptionwhen the cause is transient. - Set
retry_strategyper transport and pointfailure_transportto a dedicated queue. - Implement
RetryStrategyInterfaceonly when the built-in backoff is not enough, and register it throughretry_strategy.service. - Make the handler idempotent, with a stable idempotency key for external calls.
- Triage with
messenger:failed:show, thenmessenger:failed:retryormessenger:failed:remove. - Subscribe to
WorkerMessageFailedEventand alert only whenwillRetry()is false.