pulsar-client-go
pulsar-client-go copied to clipboard
Add a Context for `pulsar.Message` interface
Receive method of Consumer returns Message directly, but if we want attach something(ex SpanContext) in Receive method to context, we can't bring it out without change type of Message interface.
So, it is possible to add a Context or find some other way to set a context for Message ?
type Consumer interface {
Receive(context.Context) (Message, error)
...
}
Additional, when use SendAsync error handling, we can't get context directly without use Closure.
producer.SendAsync(ctx, &pulsar.ProducerMessage{}, handleErrorFunc)
Thank you.