FindCoordinator
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 6 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
- 10
- Encoded at
- v6
- Flexible versions
- 3+
- Headers
- req v2, resp v1
- Request versions
- 0-6
- Response versions
- 0-6
- Request size
- 19 bytes
- Response size
- 29 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
FindCoordinatorRequest v6, request header v2, 19 bytes on the wire
byte layout (19 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
object tree
FindCoordinatorRequest message v6 [0x0000, 19B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 15 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 10 (FindCoordinator) [0x0004, 2B] numeric id of the API being invoked | +-- request_api_version int16 = 6 [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 +-- FindCoordinatorRequest struct [0x000f, 4B] message body, version 6 +-- KeyType int8 = 0 [0x000f, 1B] The coordinator key type. (group, transaction, share). +-- CoordinatorKeys []string = 1 element [0x0010, 2B] The coordinator keys. | +-- length uvarint = 2 (compact, n+1) [0x0010, 1B] one sample element follows | +-- string[0] string = "" (compact, len+1=1) [0x0011, 1B] +-- tagged_fields uvarint = 0 [0x0012, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 10, "type": "request", "listeners": ["broker"], "name": "FindCoordinatorRequest", // Version 1 adds KeyType. // // Version 2 is the same as version 1. // // Version 3 is the first flexible version. // // Version 4 adds support for batching via CoordinatorKeys (KIP-699) // // Version 5 adds support for new error code TRANSACTION_ABORTABLE (KIP-890). // // Version 6 adds support for share groups (KIP-932). // For key type SHARE (2), the coordinator key format is "groupId:topicId:partition". "validVersions": "0-6", "flexibleVersions": "3+", "fields": [ { "name": "Key", "type": "string", "versions": "0-3", "about": "The coordinator key." }, { "name": "KeyType", "type": "int8", "versions": "1+", "default": "0", "ignorable": false, "about": "The coordinator key type. (group, transaction, share)." }, { "name": "CoordinatorKeys", "type": "[]string", "versions": "4+", "about": "The coordinator keys." } ] }
Response
FindCoordinatorResponse v6, response header v1, 29 bytes on the wire
byte layout (29 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
object tree
FindCoordinatorResponse message v6 [0x0000, 29B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 25 [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 +-- FindCoordinatorResponse struct [0x0009, 20B] message body, version 6 +-- ThrottleTimeMs int32 = 0 [0x0009, 4B] The duration in milliseconds for which the request was throttled due to a q... +-- Coordinators []Coordinator = 1 element [0x000d, 15B] Each coordinator result in the response. | +-- length uvarint = 2 (compact, n+1) [0x000d, 1B] one sample element follows | +-- Coordinator[0] Coordinator = struct [0x000e, 14B] | +-- Key string = "" (compact, len+1=1) [0x000e, 1B] The coordinator key. | +-- NodeId int32 = 0 [0x000f, 4B] The node id. | +-- Host string = "" (compact, len+1=1) [0x0013, 1B] The host name. | +-- Port int32 = 0 [0x0014, 4B] The port. | +-- ErrorCode int16 = 0 [0x0018, 2B] The error code, or 0 if there was no error. | +-- ErrorMessage string = "" (compact, len+1=1) [0x001a, 1B] The error message, or null if there was no error. | +-- tagged_fields uvarint = 0 [0x001b, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x001c, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 10, "type": "response", "name": "FindCoordinatorResponse", // Version 1 adds throttle time and error messages. // // Starting in version 2, on quota violation, brokers send out responses before throttling. // // Version 3 is the first flexible version. // // Version 4 adds support for batching via Coordinators (KIP-699) // // Version 5 adds support for new error code TRANSACTION_ABORTABLE (KIP-890). // // Version 6 adds support for share groups (KIP-932). "validVersions": "0-6", "flexibleVersions": "3+", "fields": [ { "name": "ThrottleTimeMs", "type": "int32", "versions": "1+", "ignorable": true, "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-3", "about": "The error code, or 0 if there was no error." }, { "name": "ErrorMessage", "type": "string", "versions": "1-3", "nullableVersions": "1-3", "ignorable": true, "about": "The error message, or null if there was no error." }, { "name": "NodeId", "type": "int32", "versions": "0-3", "entityType": "brokerId", "about": "The node id." }, { "name": "Host", "type": "string", "versions": "0-3", "about": "The host name." }, { "name": "Port", "type": "int32", "versions": "0-3", "about": "The port." }, { "name": "Coordinators", "type": "[]Coordinator", "versions": "4+", "about": "Each coordinator result in the response.", "fields": [ { "name": "Key", "type": "string", "versions": "4+", "about": "The coordinator key." }, { "name": "NodeId", "type": "int32", "versions": "4+", "entityType": "brokerId", "about": "The node id." }, { "name": "Host", "type": "string", "versions": "4+", "about": "The host name." }, { "name": "Port", "type": "int32", "versions": "4+", "about": "The port." }, { "name": "ErrorCode", "type": "int16", "versions": "4+", "about": "The error code, or 0 if there was no error." }, { "name": "ErrorMessage", "type": "string", "versions": "4+", "nullableVersions": "4+", "ignorable": true, "about": "The error message, or null if there was no error." } ]} ] }