-
Notifications
You must be signed in to change notification settings - Fork 410
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
Replace original context in pub/sub GoChannel (SendToSubscriber) #464
Comments
Hey @bi0dread. This is to maintain the same behavior as other Pubs/Subs. Other backends transfer the message over the network, so they can't keep the context. I guess we could make it an option in the config to keep the context, though, as a special case. |
@m110 This issue is what I am also facing. At least in the local pub-sub case, the context must be propagated (even though it doesn't match the behaviour of other pub-subs. Let me know if you want me to add this feature and push. |
Hey @yashb042. I think it makes sense, just please keep it as a config option with proper disclaimer that it doesn't match the generic behavior. :) |
Okay, picking this up |
https://github.com/ThreeDotsLabs/watermill/pull/487/files Adding test cases soon |
Added test cases as well, please review. Couldn't test the func - TestMessageCtx in test_pubsub.go Please let me know if anything to be done there |
Hi
you have replaced original msg context with msgToSend.SetContext(ctx) and we lost the original context!
so to speak :
when we call msg.Copy() we don't set original context on new msg
The text was updated successfully, but these errors were encountered: