Commit 33cd114
authored
KAFKA-9825 Kafka protocol BNF format should have some way to display tagged fields (apache#20536)
# Description
The [protocol guide](https://kafka.apache.org/protocol) 1) doesn't
display
tagged fields in BNF, and 2) includes empty tagged fields and redundant
nested tables in tables.
# Change
## BNF
Now tagged fields are displayed as FIELD_NAME<tag number>
Old: <img width="1316" height="275" alt="Screenshot 2025-09-13 at 5 34
28 PM"
src="https://github.com/user-attachments/assets/c3e59382-7a6b-43f3-bc7a-893fb27d524d"
/>
New: <img width="1386" height="328" alt="Screenshot 2025-09-24 at 12 50
34 PM"
src="https://github.com/user-attachments/assets/1ddbc95e-b0a7-4cd5-a5e0-e1303ffd2d06"
/>
Array Field: <img width="914" height="275" alt="Screenshot 2025-09-24 at
12 52 19 PM"
src="https://github.com/user-attachments/assets/cfe66a21-0d66-4f23-8e5d-1d5dac8e4c9b"
/>
## Table
Empty tagged fields are removed from the table.
Nested table for tagged fie Old: <img width="805" height="506"
alt="Screenshot 2025-09-28 at 11 07 01 PM"
src="https://github.com/user-attachments/assets/0669c2f3-150c-479d-b6ff-1d2857540fef"
/> lds are removed. Tag of the field is shown in the "Field" column.
New: <img width="1371" height="727" alt="Screenshot 2025-09-28 at 11
10 30 PM"
src="https://github.com/user-attachments/assets/030abde6-60ec-4195-9778-da48ebd01084"
/>
Reviewers: Andrew Schofield <[email protected]>1 parent 7f65b1f commit 33cd114
File tree
1 file changed
+28
-21
lines changed- clients/src/main/java/org/apache/kafka/common/protocol
1 file changed
+28
-21
lines changedLines changed: 28 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
53 | 71 | | |
54 | 72 | | |
55 | 73 | | |
| |||
90 | 108 | | |
91 | 109 | | |
92 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
93 | 117 | | |
94 | 118 | | |
95 | 119 | | |
| |||
101 | 125 | | |
102 | 126 | | |
103 | 127 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 128 | | |
109 | 129 | | |
110 | 130 | | |
111 | 131 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 132 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 133 | + | |
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
| |||
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | 147 | | |
143 | 148 | | |
| 149 | + | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
| |||
0 commit comments