This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 38f3b2835dc MINOR: API Responses missing latest version in Kafka
protocol guide (#19769)
38f3b2835dc is described below
commit 38f3b2835dc1256dc04351f83adc0bd775b15bc1
Author: Andy Li <[email protected]>
AuthorDate: Wed May 21 01:26:51 2025 +0900
MINOR: API Responses missing latest version in Kafka protocol guide (#19769)
### Issue:
API Responses missing latest version in [Kafka protocol
guide](https://kafka.apache.org/protocol.html)
#### For example:
These are missing:
- ApiVersions Response (Version: 4) — Only versions 0–3 are documented,
though version 4 of the request is included.
- DescribeTopicPartitions Response — Not listed at all.
- Fetch Response (Version: 17) — Only versions 4–16 are documented,
though version 17 of the request is included.
#### After the fix:
docs/generated/protocol_messages.html
<img width="1045" alt="image"
src="https://github.com/user-attachments/assets/5ea79ced-aab5-4c47-8e09-9956047c9bf1"
/>
Reviewers: dengziming <[email protected]>, Ken Huang
<[email protected]>, Chia-Ping Tsai <[email protected]>
---
clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
b/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
index 237948f61c9..c23aa1782d6 100644
--- a/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
+++ b/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
@@ -208,7 +208,7 @@ public class Protocol {
// Responses
b.append("<b>Responses:</b><br>\n");
Schema[] responses = key.messageType.responseSchemas();
- for (int version = key.oldestVersion(); version <
key.latestVersion(); version++) {
+ for (int version = key.oldestVersion(); version <=
key.latestVersion(); version++) {
Schema schema = responses[version];
if (schema == null)
throw new IllegalStateException("Unexpected null schema
for " + key + " with version " + version);