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

[Feature] Support reader interceptor #14642

Closed
codelipenghui opened this issue Mar 10, 2022 · 1 comment · Fixed by #14729
Closed

[Feature] Support reader interceptor #14642

codelipenghui opened this issue Mar 10, 2022 · 1 comment · Fixed by #14729
Assignees
Labels
help wanted type/feature The PR added a new feature or issue requested a new feature
Milestone

Comments

@codelipenghui
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In PIP 23, pulsar has supported producer interceptor and consumer interceptor, but we don't have reader interceptor for now.

To support reader interceptor will allow users to do integration with Pulsar client.

Describe the solution you'd like
Introduce a new ReaderInterceptor interface to intercept message before read operation

@codelipenghui codelipenghui added type/feature The PR added a new feature or issue requested a new feature help wanted labels Mar 10, 2022
@codelipenghui codelipenghui added this to the 2.11.0 milestone Mar 10, 2022
@gaoran10
Copy link
Contributor

I want to fix this problem.

codelipenghui pushed a commit that referenced this issue Mar 18, 2022
Fix #14642 

### Motivation

Currently, the Pulsar [PIP-23](https://github.com/apache/pulsar/wiki/PIP-23%3A-Message-Tracing-By-Interceptors) support adds interceptors for producers and consumers to implement message tracing, but it didn't support adding interceptors for readers, this PR wants to support adding interceptors for readers.

Because the Pulsar reader is based on the Pulsar consumer, we could leverage consumer interceptor to implement reader interceptor, use consumer interceptor to wrap reader interceptor, the reader interceptor events should be a subset of the consumer interceptors.

### Modifications

1. Add a new interface `ReaderInterceptor`, used to customize the reader interceptor.
2. Support set reader interceptor by `ReaderBuilder`.
3. Support set auto-update partition configurations by `ReaderBuilder`.
aparajita89 pushed a commit to aparajita89/pulsar that referenced this issue Mar 21, 2022
Fix apache#14642 

### Motivation

Currently, the Pulsar [PIP-23](https://github.com/apache/pulsar/wiki/PIP-23%3A-Message-Tracing-By-Interceptors) support adds interceptors for producers and consumers to implement message tracing, but it didn't support adding interceptors for readers, this PR wants to support adding interceptors for readers.

Because the Pulsar reader is based on the Pulsar consumer, we could leverage consumer interceptor to implement reader interceptor, use consumer interceptor to wrap reader interceptor, the reader interceptor events should be a subset of the consumer interceptors.

### Modifications

1. Add a new interface `ReaderInterceptor`, used to customize the reader interceptor.
2. Support set reader interceptor by `ReaderBuilder`.
3. Support set auto-update partition configurations by `ReaderBuilder`.
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this issue Apr 20, 2022
Fix apache#14642 

### Motivation

Currently, the Pulsar [PIP-23](https://github.com/apache/pulsar/wiki/PIP-23%3A-Message-Tracing-By-Interceptors) support adds interceptors for producers and consumers to implement message tracing, but it didn't support adding interceptors for readers, this PR wants to support adding interceptors for readers.

Because the Pulsar reader is based on the Pulsar consumer, we could leverage consumer interceptor to implement reader interceptor, use consumer interceptor to wrap reader interceptor, the reader interceptor events should be a subset of the consumer interceptors.

### Modifications

1. Add a new interface `ReaderInterceptor`, used to customize the reader interceptor.
2. Support set reader interceptor by `ReaderBuilder`.
3. Support set auto-update partition configurations by `ReaderBuilder`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants