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

KAFKA-15561 [1/N]: Introduce new subscribe api for RE2J regex #17897

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

lianetm
Copy link
Member

@lianetm lianetm commented Nov 21, 2024

Client support for consumer.subscribe with SubscriptionPattern (RE2/J pattern), as proposed on KIP-848. This initial PR is only adding the new APIs to all consumer classes, with support only in the async consumer.

Co-authored by: Phuc-Hong-Tran [email protected]

@@ -143,6 +143,16 @@ public synchronized void subscribe(Pattern pattern) {
subscribe(pattern, Optional.empty());
}

@Override
public void subscribe(SubscriptionPattern pattern, ConsumerRebalanceListener callback) {
throw new UnsupportedOperationException("Subscribe to RE2/J regular expression not supported in MockConsumer yet");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: support in MockConsumer will come in follow-up PR

@dajac dajac added the KIP-848 The Next Generation of the Consumer Rebalance Protocol label Nov 21, 2024
@dajac dajac self-requested a review November 21, 2024 17:52
Copy link
Member

@dajac dajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lianetm Thanks for the patch. I left a few minor comments.

@lianetm
Copy link
Member Author

lianetm commented Nov 22, 2024

Thanks @dajac, all comments addressed.

Copy link
Member

@dajac dajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@lianetm lianetm merged commit 0d7c765 into apache:trunk Nov 22, 2024
8 checks passed
chiacyu pushed a commit to chiacyu/kafka that referenced this pull request Nov 30, 2024
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clients consumer KIP-848 The Next Generation of the Consumer Rebalance Protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants