ijuma commented on code in PR #18727:
URL: https://github.com/apache/kafka/pull/18727#discussion_r1936219937


##########
clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java:
##########
@@ -149,6 +149,12 @@ public enum ApiKeys {
     private static final Map<Integer, ApiKeys> ID_TO_TYPE = 
Arrays.stream(ApiKeys.values())
         .collect(Collectors.toMap(key -> (int) key.id, Function.identity()));
 
+    // Versions 0-2 were removed in Apache Kafka 4.0, version 3 is the new 
baseline. Due to a bug in librdkafka,
+    // these versions have to be included in the api versions response (see 
KAFKA-18659), which means we cannot exclude
+    // them from the protocol definition. Instead, we reject requests with 
such versions in `KafkaApis` by returning
+    // `UnsupportedVersion` errors. We also special case the generated 
protocol html to exclude versions 0-2.

Review Comment:
   I'll clean up this description.



-- 
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