framework:
    messenger:
        # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
        failure_transport: failed

        transports:
            # https://symfony.com/doc/current/messenger.html#transport-configuration
            async_priority_high: 
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options: 
                    table_name: 'queue'
                    queue_name: 'priority_high'
            async_priority_low: 
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options: 
                    table_name: 'queue'
                    queue_name: 'priority_low'   
            failed: 'doctrine://default?queue_name=failed'
            sync: 'sync://'

        routing:
            # Route your messages to the transports
            ## php bin/console messenger:consume async_priority_high -vv
            #'App\Message\PriorityQueueItem': async_priority_high
            #'App\Message\BackgroundQueueItem': async_priority_low
            'App\Message\PriorityQueueItem': sync
            'App\Message\BackgroundQueueItem': sync
