framework: messenger: failure_transport: failed transports: # https://symfony.com/doc/current/messenger.html#transport-configuration async: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' retry_strategy: max_retries: 3 multiplier: 2 failed: 'doctrine://default?queue_name=failed' # sync: 'sync://' default_bus: messenger.bus.default buses: messenger.bus.default: [] routing: # Mail is deliberately NOT routed to async. Nothing starts a worker on the server -- # deploy.php only stops them -- so a queued SendEmailMessage would be written to # messenger_messages and stay there, with no error anywhere and nobody notified. # Sending happens in the request instead; App\Email\Mailer catches a transport # failure so it can never fail the booking that triggered it. Route it back here # once a `messenger:consume async` worker actually runs. # Symfony\Component\Mailer\Messenger\SendEmailMessage: async Symfony\Component\Notifier\Message\ChatMessage: async Symfony\Component\Notifier\Message\SmsMessage: async # Route your messages to the transports # 'App\Message\YourMessage': async