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

[Enhancement][Consumer] Parallel Execution of Interceptors in beforeConsume Method #23569

Open
2 tasks done
ZhaoGuorui666 opened this issue Nov 6, 2024 · 3 comments
Open
2 tasks done
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@ZhaoGuorui666
Copy link
Contributor

Search before asking

  • I searched in the 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.

image

Solution

No response

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@ZhaoGuorui666 ZhaoGuorui666 added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Nov 6, 2024
@visxu
Copy link
Contributor

visxu commented Nov 7, 2024

Good suggestion. However I have another word, sometimes you need multiple interceptors are executed in extremely order.
Maybe you can add a new boolean parameter requireOrder flag to determine whether to execute interceptors in order or parallel.

@TheMarvelFan
Copy link

TheMarvelFan commented Nov 12, 2024

@visxu @ZhaoGuorui666

I would like to work on this issue if no one already is.

Thanks!

@visxu
Copy link
Contributor

visxu commented Nov 12, 2024

@visxu @ZhaoGuorui666

I would like to work on this issue if no one already is.

Thanks!

Hi, @TheMarvelFan. Thanks for your attention on the issue, while I'm working on it. If you wanna start to contribute to Pulsar, Flaky-Test is a good beginning.
https://github.com/apache/pulsar/issues?q=is%3Aopen+flaky+sort%3Aupdated-desc

visxu added a commit to vissxu/pulsar that referenced this issue Nov 20, 2024
visxu added a commit to vissxu/pulsar that referenced this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

No branches or pull requests

3 participants