Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Messenger][Amqp] Fix wrong routing key when use failure queue#52083
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:6.3
Are you sure you want to change the base?
[Messenger][Amqp] Fix wrong routing key when use failure queue#52083
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedOct 16, 2023
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution 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 |
src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
908a9f3
toa489cd5
Comparea489cd5
to4e1b8fc
Compare
Uh oh!
There was an error while loading.Please reload this page.
I would like to use another amqp queue for dead letter after retries failed. I expected the message to be sent to the failure transport queue. It wasn't.
My initial configuration:
I found the issue#37985 that already mentioned the problem. A workaround using queue name as routing key for failure queue is already proposed. It is not obvious...
binding_keys: [failed, my_queue_name]
After some debug, I found the routing key is not correctly set in case of failure transport. Exchange configuration is good but routing key uses previous routing key set by retry mechanism. And retry mechanism use queue name.
Routing key comes from
RedeliveryStamp
and usesasync
queue name as routing key. It is not what I expected. But I understand it is required by the retry mechanism to push delayed message to the original queue.Finally I propose a little modification to take into account the
SentToFailureTransportStamp
and force to publish with the failure routing key by default.I think this fix could be pushed to 5.4 but I didn't test it.