-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Conversation
@@ -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"); |
There was a problem hiding this comment.
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
There was a problem hiding this 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.
clients/src/main/java/org/apache/kafka/clients/consumer/SubscriptionPattern.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/clients/consumer/SubscriptionPattern.java
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java
Show resolved
Hide resolved
Thanks @dajac, all comments addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…#17897) Reviewers: David Jacot <[email protected]>
…#17897) Reviewers: David Jacot <[email protected]>
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]