go-pubsub icon indicating copy to clipboard operation
go-pubsub copied to clipboard

Message Producer Context

Open Gobonoid opened this issue 6 years ago • 2 comments

For easier extendability I think Put message should have signature like:

PutMessage(ctx context.Context, message pubsub.ProducerMessage) error {

With current implementation wrapping this method with per request or per action behaviors is imposible. Consumer does use context.

Gobonoid avatar Jul 26 '18 20:07 Gobonoid

I see the need for this in the consumer case, where the message handling itself may block or take a long time. I'm wondering about the producer case though. Why would you expect this to block? Is it as simple as the broken being slow for some reason, or have I missed something bigger?

mjgarton avatar Nov 20 '18 14:11 mjgarton

This is addressed in substrate. : https://github.com/uw-labs/substrate

mjgarton avatar Feb 10 '19 11:02 mjgarton