-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fixing a bug where messenger:consume could send message to wrong bus #30652
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
Conversation
64d3186
to
ab3d019
Compare
41069af
to
a4f9bf3
Compare
This is ready to go! |
a4f9bf3
to
8874733
Compare
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.
Great, indeed. I was aiming to write such a PR with me (but this small change) 👌
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.
👍
26a804a
to
a94ce84
Compare
…t to a different bus
a94ce84
to
ef077cf
Compare
Thank you @weaverryan. |
…e to wrong bus (weaverryan) This PR was merged into the 4.3-dev branch. Discussion ---------- Fixing a bug where messenger:consume could send message to wrong bus | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | arguably, yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #30631 | License | MIT | Doc PR | Not needed This fixes #30631, where you can run `messener:consume` and accidentally sent received messages into the wrong bus. The fix (done via middleware) is to attach a "bus name" to the `Envelope` and use it when the message is received to find that bus. Commits ------- ef077cf Fixing a bug where a transport could receive a message and dispatch it to a different bus
Merged by e512b7e but GitHub couldn't recognise it because I pushed another commit in this branch in the meantime, closing. |
Just a thought on this, I think it is a BC Break because if you have an application running SF 4.2 which has published a message that will then be consumed by an application running SF 4.3, you will get the error: Hence I think it is a BC break. Moreover, if for example, some messages exist in a RabbitMQ queue and you updated your app to SF 4.3, then those messages can no longer be processed because they do not have this stamp. I am proposing that if the stamp is not present then the default bus to be used to handle them. |
@raresserban The component being experimental, we allow BC breaks. Though, I agree with you, it doesn't cost much effort to do so. Can you submit a pull request? Thank you! |
Yes, I agree. I've been trying to "keep in mind" (at least) the migration path for messages that are inside a queue at the moment of upgrading. See #31200 |
This fixes #30631, where you can run
messener:consume
and accidentally sent received messages into the wrong bus.The fix (done via middleware) is to attach a "bus name" to the
Envelope
and use it when the message is received to find that bus.