watermill
watermill copied to clipboard
Using message context for PubSub publishing breaks official TestMessageCtx test
When publishing, the official Posgres uses a background context. When I was working on SQLite implementation, @roblaszczak recommended that I use context from the fist message being published.
publish - you can get context from message (will better work with tracing etc.) - it's tricky when someone is publishing multiple messages - usually we just get context from first
It is a sensible recommendation. I had it this way when I first wrote the function, then reverted it to pass an official test. When I got @roblaszczak 's recommendation, I attempted to implement the change and ran into a problem:
- this change breaks the official acceptance tests.TestMessageCtx test
- had to revert here
Proposed solution: update the official test so it would pass when the context from the message is used and then update the implementations to follow the same pattern.