You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lianetm (via GitHub)" <gi...@apache.org> on 2026/03/30 21:53:22 UTC

[PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

lianetm opened a new pull request, #21900:
URL: https://github.com/apache/kafka/pull/21900

   Add info msg if Consumer created using the classic protocol, to guide users towards the next-gen Consumer rebalance protocol (GA).
   Show only if using group rebalance capabilities (group.id defined)
   Exclude Streams applications to avoid showing the log on streams (should follow separate evolution to the new streams protocol) 
   This is the first step in KIP-1274 (evolution path towards the new Consumer protocol)
   


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm merged PR #21900:
URL: https://github.com/apache/kafka/pull/21900


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on PR #21900:
URL: https://github.com/apache/kafka/pull/21900#issuecomment-4165600056

   @AndrewJSchofield raised an interesting point about the ConsoleConsumer. It does not show INFO level msgs by default, so probably most users experimenting with the consumer via that tool won't see the message. 
   The console consumer already prints msgs directly (e.g., deprecation notices), so we could do the same. I made the change in the last commit so we can take a look, and the result looks like this in the console (I intentionally used a deprecated prop and the classic protocol, so we can see the 2 messages of the same kind):
   
   <img width="1663" height="99" alt="Screenshot 2026-03-31 at 4 45 21 PM" src="https://github.com/user-attachments/assets/61ad8cf0-20a6-4a7a-99ad-0cd44dab8df0" />
   
   Thoughts @AndrewJSchofield / @dajac ? I would update on the KIP doc and thread if we agree on it, to mention that we're ensuring the msg shows in the console consumer even if INFO not enabled.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on PR #21900:
URL: https://github.com/apache/kafka/pull/21900#issuecomment-4169681510

   lgtm too!


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #21900:
URL: https://github.com/apache/kafka/pull/21900#discussion_r3012470235


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -212,6 +213,22 @@ public class ClassicKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
                     config.originals(Collections.singletonMap(ConsumerConfig.CLIENT_ID_CONFIG, clientId))
             );
 
+            // If the classic rebalance protocol is used, log message to guide users towards upgrading to the
+            // next-generation consumer rebalance protocol
+            if (groupId.isPresent()) {
+                boolean isStreamsConsumer = assignors.stream()
+                        .anyMatch(a -> a.getClass().getName().contains("StreamsPartitionAssignor"));
+                if (!isStreamsConsumer) {
+                    log.info("\n" +
+                            "****************************************************************\n" +
+                            "* The consumer rebalance protocol (KIP-848) is production ready!\n" +
+                            "* Set {}={} to try it out.\n" +

Review Comment:
   Maybe "Set the consumer configuration {}={} to try it out.\n" would be a bit more explicit.



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on code in PR #21900:
URL: https://github.com/apache/kafka/pull/21900#discussion_r3015744481


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -212,6 +213,22 @@ public class ClassicKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
                     config.originals(Collections.singletonMap(ConsumerConfig.CLIENT_ID_CONFIG, clientId))
             );
 
+            // If the classic rebalance protocol is used, log message to guide users towards upgrading to the
+            // next-generation consumer rebalance protocol
+            if (groupId.isPresent()) {
+                boolean isStreamsConsumer = assignors.stream()
+                        .anyMatch(a -> a.getClass().getName().contains("StreamsPartitionAssignor"));
+                if (!isStreamsConsumer) {
+                    log.info("\n" +
+                            "****************************************************************\n" +
+                            "* The consumer rebalance protocol (KIP-848) is production ready!\n" +
+                            "* Set the consumer configuration {}={} to try it out.\n" +
+                            "* See https://kafka.apache.org/documentation/#consumer_rebalance_protocol\n" +

Review Comment:
   We should consider updating the page with a few more information:
   1/ Assignors mapping;
   2/ Envisioned timeline, even if it could change.
   It would help users, I think. What do you think?



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on PR #21900:
URL: https://github.com/apache/kafka/pull/21900#issuecomment-4168503770

   @lianetm This is what I was envisaging for console consumer. Looks good to me.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20282: Add message to classic consumer startup guiding to next-gen protocol [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on code in PR #21900:
URL: https://github.com/apache/kafka/pull/21900#discussion_r3015965935


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ClassicKafkaConsumer.java:
##########
@@ -212,6 +213,22 @@ public class ClassicKafkaConsumer<K, V> implements ConsumerDelegate<K, V> {
                     config.originals(Collections.singletonMap(ConsumerConfig.CLIENT_ID_CONFIG, clientId))
             );
 
+            // If the classic rebalance protocol is used, log message to guide users towards upgrading to the
+            // next-generation consumer rebalance protocol
+            if (groupId.isPresent()) {
+                boolean isStreamsConsumer = assignors.stream()
+                        .anyMatch(a -> a.getClass().getName().contains("StreamsPartitionAssignor"));
+                if (!isStreamsConsumer) {
+                    log.info("\n" +
+                            "****************************************************************\n" +
+                            "* The consumer rebalance protocol (KIP-848) is production ready!\n" +
+                            "* Set the consumer configuration {}={} to try it out.\n" +
+                            "* See https://kafka.apache.org/documentation/#consumer_rebalance_protocol\n" +

Review Comment:
   Sure, I had just created https://issues.apache.org/jira/browse/KAFKA-20376 to address that (thinking about updating rack aware info and add perf links, will include these you mention too, makes sense)



-- 
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-unsubscribe@kafka.apache.org

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