apache / apache/pulsar-client-go

Add context param in interceptor

Open
#443 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
745
Forks
389
Avg merge
3d 20h
Merged PRs (30d)
3

Description

**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)

Contributor guide

Open the contributing guide

Research direction

Start by locating ProducerInterceptor and its BeforeSend method, then inspect every call site and any related interceptor tests. The issue's requested change is complete when BeforeSend accepts a context.Context and the relevant producer message delivery path passes it through without changing existing interceptor behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.