[Enhancement][Consumer] Parallel Execution of Interceptors in `beforeConsume` Method
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Motivation
Currently, the `beforeConsume` method in `ConsumerInterceptors.java` executes each interceptor sequentially. Since the interceptors operate independently without dependencies on one another, introducing parallel execution can potentially improve performance.

### Solution
_No response_
### Alternatives
_No response_
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Research direction
The issue names ConsumerInterceptors.java and its beforeConsume method; start there to understand the current sequential interceptor execution. Determine the required concurrency and completion behavior for independent interceptors, then verify that beforeConsume executes them in parallel without changing consumer semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100