mjsax commented on code in PR #18977:
URL: https://github.com/apache/kafka/pull/18977#discussion_r1964074951


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerGroupMetadata.java:
##########
@@ -16,77 +16,23 @@
  */
 package org.apache.kafka.clients.consumer;
 
-import org.apache.kafka.common.requests.JoinGroupRequest;
-
-import java.util.Objects;
 import java.util.Optional;
 
 /**
  * A metadata struct containing the consumer group information.
+ * <p>
+ * To obtain an instance of this interface, use the {@link 
KafkaConsumer#groupMetadata()}
+ * method of the {@link KafkaConsumer consumer}. This method returns the 
current group metadata for the consumer.
+ * <p>
  * Note: Any change to this class is considered public and requires a KIP.
  */
-public class ConsumerGroupMetadata {

Review Comment:
   We cannot do it this way. For Kafka 4.1, we need to keep the class as-is, to 
maintain backward compatibility. We should only _deprecate_ both constructors, 
and update the JavaDocs saying, that this class will become an interface in the 
future, ie, Apache Kafka 5.0.
   
   The KIP should lay out this two step approach, and if the KIP gets accepted, 
we should file a follow up ticket for AK 5.0 release, that would do the actual 
code change from `class` to `interface`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to