ReadShareGroupState
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
- 84
- Encoded at
- v0
- Flexible versions
- 0+
- Headers
- req v2, resp v1
- Request versions
- 0
- Response versions
- 0
- Request size
- 45 bytes
- Response size
- 70 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
ReadShareGroupStateRequest v0, request header v2, 45 bytes on the wire
byte layout (45 bytes, 16 bytes per row)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0000
0010
0020
object tree
ReadShareGroupStateRequest message v0 [0x0000, 45B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 41 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 84 (ReadShareGroupState) [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 +-- ReadShareGroupStateRequest struct [0x000f, 30B] message body, version 0 +-- GroupId string = "" (compact, len+1=1) [0x000f, 1B] The group identifier. +-- Topics []ReadStateData = 1 element [0x0010, 28B] The data for the topics. | +-- length uvarint = 2 (compact, n+1) [0x0010, 1B] one sample element follows | +-- ReadStateData[0] ReadStateData = struct [0x0011, 27B] | +-- TopicId uuid = 00000000-0000-0000-0000-000000000000 [0x0011, 16B] The topic identifier. | +-- Partitions []PartitionData = 1 element [0x0021, 10B] The data for the partitions. | | +-- length uvarint = 2 (compact, n+1) [0x0021, 1B] one sample element follows | | +-- PartitionData[0] PartitionData = struct [0x0022, 9B] | | +-- Partition int32 = 0 [0x0022, 4B] The partition index. | | +-- LeaderEpoch int32 = 0 [0x0026, 4B] The leader epoch of the share-partition. | | +-- tagged_fields uvarint = 0 [0x002a, 1B] number of tagged fields in this struct | +-- tagged_fields uvarint = 0 [0x002b, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x002c, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 84, "type": "request", "listeners": ["broker"], "name": "ReadShareGroupStateRequest", "validVersions": "0", "flexibleVersions": "0+", "latestVersionUnstable": true, "fields": [ { "name": "GroupId", "type": "string", "versions": "0+", "about":"The group identifier." }, { "name": "Topics", "type": "[]ReadStateData", "versions": "0+", "about": "The data for the topics.", "fields": [ { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The topic identifier." }, { "name": "Partitions", "type": "[]PartitionData", "versions": "0+", "about": "The data for the partitions.", "fields": [ { "name": "Partition", "type": "int32", "versions": "0+", "about": "The partition index." }, { "name": "LeaderEpoch", "type": "int32", "versions": "0+", "about": "The leader epoch of the share-partition." } ]} ]} ] }
Response
ReadShareGroupStateResponse v0, response header v1, 70 bytes on the wire
byte layout (70 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
0040
object tree
ReadShareGroupStateResponse message v0 [0x0000, 70B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 66 [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 +-- ReadShareGroupStateResponse struct [0x0009, 61B] message body, version 0 +-- Results []ReadStateResult = 1 element [0x0009, 60B] The read results. | +-- length uvarint = 2 (compact, n+1) [0x0009, 1B] one sample element follows | +-- ReadStateResult[0] ReadStateResult = struct [0x000a, 59B] | +-- TopicId uuid = 00000000-0000-0000-0000-000000000000 [0x000a, 16B] The topic identifier. | +-- Partitions []PartitionResult = 1 element [0x001a, 42B] The results for the partitions. | | +-- length uvarint = 2 (compact, n+1) [0x001a, 1B] one sample element follows | | +-- PartitionResult[0] PartitionResult = struct [0x001b, 41B] | | +-- Partition int32 = 0 [0x001b, 4B] The partition index. | | +-- ErrorCode int16 = 0 [0x001f, 2B] The error code, or 0 if there was no error. | | +-- ErrorMessage string = "" (compact, len+1=1) [0x0021, 1B] The error message, or null if there was no error. | | +-- StateEpoch int32 = 0 [0x0022, 4B] The state epoch for this share-partition. | | +-- StartOffset int64 = 0 [0x0026, 8B] The share-partition start offset, which can be -1 if it is not yet initiali... | | +-- StateBatches []StateBatch = 1 element [0x002e, 21B] The state batches for this share-partition. | | | +-- length uvarint = 2 (compact, n+1) [0x002e, 1B] one sample element follows | | | +-- StateBatch[0] StateBatch = struct [0x002f, 20B] | | | +-- FirstOffset int64 = 0 [0x002f, 8B] The base offset of this state batch. | | | +-- LastOffset int64 = 0 [0x0037, 8B] The last offset of this state batch. | | | +-- DeliveryState int8 = 0 [0x003f, 1B] The state - 0:Available,2:Acked,4:Archived. | | | +-- DeliveryCount int16 = 0 [0x0040, 2B] The delivery count. | | | +-- tagged_fields uvarint = 0 [0x0042, 1B] number of tagged fields in this struct | | +-- tagged_fields uvarint = 0 [0x0043, 1B] number of tagged fields in this struct | +-- tagged_fields uvarint = 0 [0x0044, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0045, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 84, "type": "response", "name": "ReadShareGroupStateResponse", "validVersions": "0", "flexibleVersions": "0+", // - NOT_COORDINATOR (version 0+) // - COORDINATOR_NOT_AVAILABLE (version 0+) // - COORDINATOR_LOAD_IN_PROGRESS (version 0+) // - GROUP_ID_NOT_FOUND (version 0+) // - UNKNOWN_TOPIC_OR_PARTITION (version 0+) // - INVALID_REQUEST (version 0+) "fields": [ { "name": "Results", "type": "[]ReadStateResult", "versions": "0+", "about": "The read results.", "fields": [ { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The topic identifier." }, { "name": "Partitions", "type": "[]PartitionResult", "versions": "0+", "about" : "The results for the partitions.", "fields": [ { "name": "Partition", "type": "int32", "versions": "0+", "about": "The partition index." }, { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The error code, or 0 if there was no error." }, { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", "about": "The error message, or null if there was no error." }, { "name": "StateEpoch", "type": "int32", "versions": "0+", "about": "The state epoch for this share-partition." }, { "name": "StartOffset", "type": "int64", "versions": "0+", "about": "The share-partition start offset, which can be -1 if it is not yet initialized." }, { "name": "StateBatches", "type": "[]StateBatch", "versions": "0+", "about": "The state batches for this share-partition.", "fields":[ { "name": "FirstOffset", "type": "int64", "versions": "0+", "about": "The base offset of this state batch." }, { "name": "LastOffset", "type": "int64", "versions": "0+", "about": "The last offset of this state batch." }, { "name": "DeliveryState", "type": "int8", "versions": "0+", "about": "The state - 0:Available,2:Acked,4:Archived." }, { "name": "DeliveryCount", "type": "int16", "versions": "0+", "about": "The delivery count." } ]} ]} ]} ] }