This is an automated email from the ASF dual-hosted git repository.

mimaison 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 be6feb2f636 KAFKA-20354: Add missing Control Batch types in 
documentation (#21866)
be6feb2f636 is described below

commit be6feb2f6363e6e61625a09058dc74b7309451a9
Author: Federico Valeri <[email protected]>
AuthorDate: Fri Apr 10 10:28:50 2026 +0200

    KAFKA-20354: Add missing Control Batch types in documentation (#21866)
    
    This patch adds missing Control Batch types in the documentation.
    
    
    Reviewers: Luke Chen <[email protected]>, Andrew Schofield 
<[email protected]>, Mickael Maison <[email protected]>
    
    ---------
    
    Signed-off-by: Federico Valeri <[email protected]>
---
 docs/implementation/message-format.md | 55 ++++++++++++++++++++++++++++++++---
 1 file changed, 51 insertions(+), 4 deletions(-)

diff --git a/docs/implementation/message-format.md 
b/docs/implementation/message-format.md
index 29078b759c4..2a9ced5c074 100644
--- a/docs/implementation/message-format.md
+++ b/docs/implementation/message-format.md
@@ -72,16 +72,63 @@ Compaction may also modify the baseTimestamp if the record 
batch contains record
 
 ### Control Batches
 
-A control batch contains a single record called the control record. Control 
records should not be passed on to applications. Instead, they are used by 
consumers to filter out aborted transactional messages.
+A control batch contains a single record called the control record. Control 
records should not be returned to applications. Instead, they are used by 
consumers to filter out aborted transactional messages, and by the KRaft 
implementation for its protocol metadata.
 
-The key of a control record conforms to the following schema: 
+The key of a control record conforms to the following schema:
 
 ```text
 version: int16 (current version is 0)
-type: int16 (0 indicates an abort marker, 1 indicates a commit)
+type: int16 (the control record types are in the table below)
 ```
 
-The schema for the value of a control record is dependent on the type. The 
value is opaque to clients.
+The following control record types are currently defined for regular topics:
+
+<table>
+<tr>
+<th>
+
+Type
+</th>
+<th>
+
+Name
+</th>
+<th>
+
+Description
+</th>
+</tr>
+<tr>
+<td>
+
+0
+</td>
+<td>
+
+ABORT
+</td>
+<td>
+
+Marks a transaction as aborted.
+</td>
+</tr>
+<tr>
+<td>
+
+1
+</td>
+<td>
+
+COMMIT
+</td>
+<td>
+
+Marks a transaction as committed.
+</td>
+</tr>
+</table>
+
+Types 0 and 1 are used as end-of-transaction markers for the transactional 
messaging protocol. Types 2 through 6 are used internally by the KRaft 
consensus protocol. The schema of the value in the control record is dependent 
on the type. The value is opaque to clients.
 
 ## Record
 

Reply via email to