Closed

Description
For the Prioritized Transports, the example displayed does not work. I solved it in my code using two different dsn (not sure it is the best pratice).
In the doc, we have :
#.env
MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
#config/packages/messenger.yaml
framework:
messenger:
transports:
async_priority_high:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
# queue_name is specific to the doctrine transport
# try "exchange" for amqp or "group1" for redis
queue_name: high
async_priority_low:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
queue_name: low
routing:
'App\Message\SmsNotification': async_priority_low
'App\Message\NewUserWelcomeEmail': async_priority_high
It should be :
#.env
MESSENGER_TRANSPORT_DSN_HIGH=amqp://guest:guest@localhost:5672/%2f/messages_high
MESSENGER_TRANSPORT_DSN_LOW=amqp://guest:guest@localhost:5672/%2f/messages_low
#config/packages/messenger.yaml
framework:
messenger:
transports:
async_priority_high:
dsn: '%env(MESSENGER_TRANSPORT_DSN_HIGH)%'
options:
# queue_name is specific to the doctrine transport
# try "exchange" for amqp or "group1" for redis
queue_name: high
async_priority_low:
dsn: '%env(MESSENGER_TRANSPORT_DSN_LOW)%'
options:
queue_name: low
routing:
'App\Message\SmsNotification': async_priority_low
'App\Message\NewUserWelcomeEmail': async_priority_high