UpdateRaftVoter
This page encodes the smallest legal instance of the request and the response: numeric fields are zero, strings and byte arrays are empty, every array carries exactly one sample element, and any records field holds one empty 61-byte RecordBatch v2. Version 0 is a flexible version, so every struct is terminated by a uvarint tagged-field count and strings and arrays carry compact length-plus-one prefixes. Sizes below include the leading int32 size prefix.
- API key
- 82
- Encoded at
- v0
- Flexible versions
- 0+
- Headers
- req v2, resp v1
- Request versions
- 0
- Response versions
- 0
- Request size
- 52 bytes
- Response size
- 16 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
UpdateRaftVoterRequest v0, request header v2, 52 bytes on the wire
byte layout (52 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
0030
object tree
UpdateRaftVoterRequest message v0 [0x0000, 52B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 48 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 82 (UpdateRaftVoter) [0x0004, 2B] numeric id of the API being invoked | +-- request_api_version int16 = 0 [0x0006, 2B] version of the API being invoked | +-- correlation_id int32 = 0 [0x0008, 4B] echoed back by the broker in the response | +-- client_id nullable_string = "" (int16 len=0) [0x000c, 2B] always a non-flexible int16-prefixed string | +-- tagged_fields uvarint = 0 [0x000e, 1B] number of tagged fields in the header +-- UpdateRaftVoterRequest struct [0x000f, 37B] message body, version 0 +-- ClusterId string = "" (compact, len+1=1) [0x000f, 1B] The cluster id. +-- CurrentLeaderEpoch int32 = 0 [0x0010, 4B] The current leader epoch of the partition, -1 for unknown leader epoch. +-- VoterId int32 = 0 [0x0014, 4B] The replica id of the voter getting updated in the topic partition. +-- VoterDirectoryId uuid = 00000000-0000-0000-0000-000000000000 [0x0018, 16B] The directory id of the voter getting updated in the topic partition. +-- Listeners []Listener = 1 element [0x0028, 6B] The endpoint that can be used to communicate with the leader. | +-- length uvarint = 2 (compact, n+1) [0x0028, 1B] one sample element follows | +-- Listener[0] Listener = struct [0x0029, 5B] | +-- Name string = "" (compact, len+1=1) [0x0029, 1B] The name of the endpoint. | +-- Host string = "" (compact, len+1=1) [0x002a, 1B] The hostname. | +-- Port uint16 = 0 [0x002b, 2B] The port. | +-- tagged_fields uvarint = 0 [0x002d, 1B] number of tagged fields in this struct +-- KRaftVersionFeature KRaftVersionFeature = struct [0x002e, 5B] The range of versions of the protocol that the replica supports. | +-- MinSupportedVersion int16 = 0 [0x002e, 2B] The minimum supported KRaft protocol version. | +-- MaxSupportedVersion int16 = 0 [0x0030, 2B] The maximum supported KRaft protocol version. | +-- tagged_fields uvarint = 0 [0x0032, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0033, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 82, "type": "request", "listeners": ["controller"], "name": "UpdateRaftVoterRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "ClusterId", "type": "string", "versions": "0+", "nullableVersions": "0+", "about": "The cluster id."}, { "name": "CurrentLeaderEpoch", "type": "int32", "versions": "0+", "about": "The current leader epoch of the partition, -1 for unknown leader epoch." }, { "name": "VoterId", "type": "int32", "versions": "0+", "about": "The replica id of the voter getting updated in the topic partition." }, { "name": "VoterDirectoryId", "type": "uuid", "versions": "0+", "about": "The directory id of the voter getting updated in the topic partition." }, { "name": "Listeners", "type": "[]Listener", "versions": "0+", "about": "The endpoint that can be used to communicate with the leader.", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "about": "The name of the endpoint." }, { "name": "Host", "type": "string", "versions": "0+", "about": "The hostname." }, { "name": "Port", "type": "uint16", "versions": "0+", "about": "The port." } ]}, { "name": "KRaftVersionFeature", "type": "KRaftVersionFeature", "versions": "0+", "about": "The range of versions of the protocol that the replica supports.", "fields": [ { "name": "MinSupportedVersion", "type": "int16", "versions": "0+", "about": "The minimum supported KRaft protocol version." }, { "name": "MaxSupportedVersion", "type": "int16", "versions": "0+", "about": "The maximum supported KRaft protocol version." } ]} ] }
Response
UpdateRaftVoterResponse v0, response header v1, 16 bytes on the wire
byte layout (16 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
object tree
UpdateRaftVoterResponse message v0 [0x0000, 16B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 12 [0x0000, 4B] number of bytes that follow, patched after encoding +-- ResponseHeader v1 [0x0004, 5B] common response header | +-- correlation_id int32 = 0 [0x0004, 4B] matches the correlation_id of the request | +-- tagged_fields uvarint = 0 [0x0008, 1B] number of tagged fields in the header +-- UpdateRaftVoterResponse struct [0x0009, 7B] message body, version 0 +-- ThrottleTimeMs int32 = 0 [0x0009, 4B] The duration in milliseconds for which the request was throttled due to a q... +-- ErrorCode int16 = 0 [0x000d, 2B] The error code, or 0 if there was no error. +-- tagged_fields uvarint = 0 [0x000f, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 82, "type": "response", "name": "UpdateRaftVoterResponse", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The error code, or 0 if there was no error." }, { "name": "CurrentLeader", "type": "CurrentLeader", "versions": "0+", "taggedVersions": "0+", "tag": 0, "about": "Details of the current Raft cluster leader.", "fields": [ { "name": "LeaderId", "type": "int32", "versions": "0+", "default": "-1", "entityType" : "brokerId", "about": "The replica id of the current leader or -1 if the leader is unknown." }, { "name": "LeaderEpoch", "type": "int32", "versions": "0+", "default": "-1", "about": "The latest known leader epoch." }, { "name": "Host", "type": "string", "versions": "0+", "about": "The node's hostname." }, { "name": "Port", "type": "int32", "versions": "0+", "about": "The node's port." } ] } ] }