gaoran10 opened a new pull request #14729: URL: https://github.com/apache/pulsar/pull/14729
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`, it used to cutomise reader interceptor. 2. Add a `ReaderInterceptor` list in `ReaderConfigurationData` to transport `ReaderInterceptor` list to Reader. 3. Add auto update partition configurations in `ReaderConfigurationData`. 4. Support set reader interceptor by `ReaderBuilder`. ### Verifying this change Add ReaderInterceptor test. ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* - Dependencies (does it add or upgrade a dependency): (no) - The public API: (yes) - The schema: (no) - The default values of configurations: (no) - The wire protocol: (no) - The rest endpoints: (no) - The admin cli options: (no) - Anything that affects deployment: (no) ### Documentation Check the box below or label this PR directly (if you have committer privilege). Need to update docs? - [*] `doc-required` (If you need help on updating docs, create a doc issue) - [ ] `no-need-doc` (Please explain why) - [ ] `doc` (If this PR contains doc changes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
