Skip to content
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

ISSUE-443: Add context param in interceptor #140

Open
sijie opened this issue Jan 18, 2021 · 1 comment
Open

ISSUE-443: Add context param in interceptor #140

sijie opened this issue Jan 18, 2021 · 1 comment
Assignees

Comments

@sijie
Copy link
Member

sijie commented Jan 18, 2021

Original Issue: apache#443


Is your feature request related to a problem? Please describe.
I want to add opentracing tracking for message delivery. Executing opentracing related code in the interceptor is an elegant way which won't cause a bad influence on my logic code. However, the interceptor has no context parameter, which makes it difficult to pass in the relevant context.

Describe the solution you'd like
I want to add context param in ProducerInterceptor's BeforeSend method.
BeforeSend(producer Producer, message *ProducerMessage)

BeforeSend(ctx context.Context, producer Producer, message *ProducerMessage)

@GPrabhudas
Copy link

As the issue points out, Is it possible to add context.Context as parameter to BeforeSend method ?

I've requirement to add some common properties to the message before sending it. So I think BeforeSend method is a good place to do this if it accepts context.Context parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants