[ 
https://issues.apache.org/jira/browse/KAFKA-15538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17804756#comment-17804756
 ] 

Lianet Magrans edited comment on KAFKA-15538 at 1/9/24 2:43 PM:
----------------------------------------------------------------

Hi [~phuctran] , both tasks are indeed related but are not duplicates:
- this task is for implementing the existing 
[subscribe|https://github.com/apache/kafka/blob/bdad1631824035c8c31163ca6d054feff5421b29/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java#L1659]
 functions, that receive a java #Pattern as parameter (will be eventually 
deprecated but need to be implemented to be supported in the meantime).
- KAFKA refers to implementing the new subscribe functions proposed by the KIP 
[here|https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol#KIP848:TheNextGenerationoftheConsumerRebalanceProtocol-NewConsumermethods],
 that use the new #SubscriptionPattern class defined in the KIP as parameter.


was (Author: JIRAUSER300183):
Hi [~phuctran] , both tasks are indeed related but are not duplicates:
- this task is for implementing the existing 
[subscribe|https://github.com/apache/kafka/blob/bdad1631824035c8c31163ca6d054feff5421b29/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java#L1659]
 functions, that receive a java #Pattern as parameter (will be eventually 
deprecated but need to be implemented to be supported in the meantime).
- KAFKA refers to implementing the new subscribe functions proposed by the KIP 
[here|https://cwiki.apache.org/confluence/display/KAFKA/KIP-848%3A+The+Next+Generation+of+the+Consumer+Rebalance+Protocol#KIP848:TheNextGenerationoftheConsumerRebalanceProtocol-NewConsumermethods],
 that use the new #SubscriptionPattern class defined in the KIP as parameter.

> Client support for java regex based subscription
> ------------------------------------------------
>
>                 Key: KAFKA-15538
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15538
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: clients, consumer
>            Reporter: Lianet Magrans
>            Assignee: Phuc Hong Tran
>            Priority: Major
>              Labels: kip-848, kip-848-client-support
>             Fix For: 3.8.0
>
>
> When using subscribe with a java regex (Pattern), we need to resolve it on 
> the client side to send the broker a list of topic names to subscribe to.
> Context:
> The new consumer group protocol uses [Google 
> RE2/J|https://github.com/google/re2j] for regular expressions and introduces 
> new methods in the consumer API to subscribe using a `SubscribePattern`. The 
> subscribe using a java `Pattern` will be still supported for a while but 
> eventually removed.
>  * When the subscribe with SubscriptionPattern is used, the client should 
> just send the regex to the broker and it will be resolved on the server side.
>  * In the case of the subscribe with Pattern, the regex should be resolved on 
> the client side.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to