framework:
    messenger:
        failure_transport: failed

        transports:
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                retry_strategy:
                    max_retries: 3
                    delay: 5000
                    multiplier: 2
            failed: 'doctrine://default?queue_name=failed'
            sync: 'sync://'
            scheduler_default:
                dsn: 'schedule://default'
                # SchedulerTransport cannot send(); any retry re-send crashes the
                # worker with "cannot send messages". Disable retry — a transient
                # handler failure (e.g. DB blip) is simply retried on the next tick.
                retry_strategy:
                    max_retries: 0

        routing:
            'App\Sms\Message\SendSmsMessage': async
            'App\Appointment\Message\ExpireAppointmentsMessage': scheduler_default
            'App\Shared\Logging\Message\PruneLogsMessage': scheduler_default

when@test:
    framework:
        messenger:
            transports:
                async: 'in-memory://'
