Description
Symfony version(s) affected: 5.1
Description
queue_name option not used in amazon sqs connection when setup transports the bridge create a queue with an empty name
How to reproduce
.env.dist
MESSENGER_TRANSPORT_DSN=sqs://localhost:9324?sslmode=disable
config/packages/messenger.yaml
framework:
messenger:
failure_transport: failed
transports:
failed:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
queue_name: 'failed'
dump $this->configuration
on Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\Connection:231
array:11 [
"buffer_size" => 9
"wait_time" => 20
"poll_timeout" => 0.1
"visibility_timeout" => null
"auto_setup" => false
"access_key" => null
"secret_key" => null
"endpoint" => "https://sqs.eu-west-1.amazonaws.com"
"region" => "eu-west-1"
"queue_name" => ""
"account" => null
]
Possible Solution
the reason for the bug is not the queue name in the MESSENGER_DSN and the queue_name option is not used
*** suggestions ***
throw InvalidArgument when $parsedPath return empty queue_name and override queue_name if it's defined in options on
Symfony\Component\Messenger\Bridge\AmazonSqs\Transport\Connection::fromDsn
Additional context
I used roribio16/alpine-sqs to simulate sqs locally