-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Symfony\Messenger] Default routing duplicates messages #51024
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
Comments
This is already fixed on 6.3 |
@jokaorgua Can you confirm that upgrading to 6.3 fixes the issue for you? |
I'm not able to update my project to 6.3 currently. So I can not tell you if that helps. Sorry. I've reviewed the PR https://github.com/symfony/symfony/pull/48121/files#diff-8e667f377e9f47d42cdc1a83364b33083f8c4bfe45ef9e934e6f102bb4c36738 and tests for the fix. I'm sure that everything works correctly but personally I do not see a test for the situation when we have something like $messenger->routing(DummyMessage)->senders(['first']);
$messenger->routing('ParentOfDummyNamespace\*')->senders(['second']);
$messenger->routing('*')->senders(['default']); I'm confused with code |
You would only need to bump messenger to 6.3. That being said, Symfony 6.2 is going to be EOL in a couple of days, so whatever blocks you, you should sort it out soon.
I'm going to close the issue then and assume that it's fixed. If one fine day you've upgraded to 6.3 and the problem is still not fixed for you, please open a new issue. |
Symfony version(s) affected
6.2.9
Description
Due to documentation https://symfony.com/doc/current/messenger.html#routing-messages-to-a-transport we can define a default routing for all messages.
When we want to set a specific sender for a specific message we should use the code
In my opinion this should rewrite the transport for this one specific message and send the message only to 'another_async' transport.
In reality the message is sent to async + to another_async transports. So the default '*' acts like a template for message namespaces
How to reproduce
Possible Solution
I see 2 possible solutions
Additional Context
No response
The text was updated successfully, but these errors were encountered: