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

  1. Classify each failure: UnrecoverableMessageHandlingException when retrying cannot help, RecoverableMessageHandlingException when the cause is transient.
  2. Set retry_strategy per transport and point failure_transport to a dedicated queue.
  3. Implement RetryStrategyInterface only when the built-in backoff is not enough, and register it through retry_strategy.service.
  4. Make the handler idempotent, with a stable idempotency key for external calls.
  5. Triage with messenger:failed:show, then messenger:failed:retry or messenger:failed:remove.
  6. Subscribe to WorkerMessageFailedEvent and alert only when willRetry() is false.
Installs
73
GitHub Stars
224
First Seen
Sep 17, 2026