- What does pccomponentes/messenger-retry-bundle actually do?
- It is a Symfony bundle that adds retry support to Symfony Messenger so failed async messages are retried with configurable strategies instead of being dropped. The goal is to absorb transient failures such as network blips or temporary downstream outages without hand-writing retry logic. Because it plugs into Messenger rather than Laravel's queue system, it is relevant to Laravel or Symfony applications that dispatch work through Messenger transports.
- How do I install pccomponentes/messenger-retry-bundle with Composer?
- Install it with composer require pccomponentes/messenger-retry-bundle and confirm the resolved version in your composer.lock. Because the v2.1.1 release only widened the Symfony dependency ceiling, run composer why-not checks if your project pins Symfony components tightly. After install, register the bundle in your kernel or bundles.php so its retry services are picked up by the container.
- Does this package support Laravel 11 and Symfony 7?
- The v2.1.1 changelog states Symfony 7 support, and Laravel 11 ships against Symfony 7 components, so the package is installable on that stack. Note that the changelog asserts a widened constraint rather than a published green CI matrix on 7.x, so treat it as install-compatible until you verify in your own suite. Teams on Laravel 9 or 10 with Symfony 6.x should be unaffected, since widening a range does not force a resolution change.
- How do I configure the retry strategy and max retry count?
- Retry behaviour is configured through the bundle's configuration, typically a strategy plus a maximum number of attempts, exposed under your application's config directory. Defaults are usually sensible, so start by running one failing message through and observing the attempt count and delay pattern before tuning. If you also configure Symfony Messenger's own retry_strategy on a transport, be explicit about which layer owns retries so the two do not compound.
- Does it work with Laravel queues, Horizon, or the database driver?
- No. It targets Symfony Messenger transports, not Laravel's queue component, so Laravel's built-in tries, backoff, and failed_jobs handling are separate mechanisms. If your application dispatches jobs through Laravel queues, use the framework's native retry configuration instead. Only adopt this bundle where Messenger is the actual dispatch path, for example in a Symfony service inside a hybrid or migrated codebase.
- What happens to a message after all retries are exhausted?
- Once the configured attempt limit is reached the message stops being retried and is routed to the failure transport or dead-letter handling you have configured in Messenger. That is the behaviour you want to monitor, because it is the point where human or automated intervention becomes necessary. Make sure failure transport storage and alerting are in place before relying on retries in production.
- Is pccomponentes/messenger-retry-bundle safe to run in production?
- The evidence base is thin: only the v2.1.1 changelog line confirming Symfony 7 support was available, with no composer.json, CI configuration, or test results published. The code change itself is a dependency-range widening rather than a behavioural rewrite, which limits blast radius, but widening a shared constraint can surface transitive conflicts on fresh installs. Pin exact versions, run your full test suite, and stage the upgrade before rolling it out broadly.
- How do I test that retries actually work in my application?
- Write an integration test that dispatches a message whose handler throws on the first N invocations, then assert the handler was called the expected number of times and that the message landed in the failure transport once exhausted. Keep delays short in the test configuration so the suite does not sleep. Also verify the configuration is loaded, since a silently unregistered bundle produces a passing test with no retries at all.
- What are the alternatives to using this bundle?
- Symfony Messenger already exposes a per-transport retry_strategy with max_retries, delay, and multiplier options, which covers many use cases without an extra dependency. Laravel applications can use queue-level tries and backoff if their work runs through Laravel queues rather than Messenger. Reach for this bundle when you want a packaged, opinionated retry layer rather than hand-rolling strategy configuration.
- Is the package actively maintained and which versions should I pin?
- The only confirmed signal is the v2.1.1 release adding Symfony 7 support, so maintenance activity should be checked directly on the repository before committing to it. Pin to a specific minor you have tested rather than floating, since a constraint widening shipped as a patch can silently pull a new Symfony major on a fresh install. If you need stronger guarantees, ask the maintainer about CI coverage on Symfony 7 and the intended Laravel support range.