watermill icon indicating copy to clipboard operation
watermill copied to clipboard

Using message context for PubSub publishing breaks official TestMessageCtx test

Open dkotik opened this issue 6 months ago • 0 comments

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:

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.

dkotik avatar May 15 '25 09:05 dkotik