-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] #44254 Changing queue name precedence #44291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 5.3
Are you sure you want to change the base?
[Messenger] #44254 Changing queue name precedence #44291
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DSN takes precedence over the options on purpose.
ie. PROD and PRE_PROD share the same configuration (and same queue_name
in the messenger.yaml) but they use 2 differents DSN to define the targeted queue.
If you want to share the same DSN across different configurations, you can either:
- remove the queue name from the ENV variabnle, in that way, the connection will fallback to the option
- make the queue name part the DSN. ie.
dsn : "%env(MESSENGER_TRANSPORT_DSN)%/my_queue"
src/Symfony/Component/Messenger/Bridge/AmazonSqs/Tests/Transport/ConnectionTest.php
Outdated
Show resolved
Hide resolved
Thanks for your review @jderusse ! In this case I'll let the reporter here know to just remove the queue name from the DSN and specify it explicitly in the options. And then I just left a test for the default message name == 'messages' as I haven't found such a test in the suite. LMK if it makes sense and thanks again! |
Suggesting to change the precedence of
queue_name
option toconfig -> DSN -> default ("messages")
instead of currentDSN -> config -> default ("messages")