ShareAcknowledge
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
- 79
- Encoded at
- v0
- Flexible versions
- 0+
- Headers
- req v2, resp v1
- Request versions
- 0
- Response versions
- 0
- Request size
- 66 bytes
- Response size
- 65 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
ShareAcknowledgeRequest v0, request header v2, 66 bytes on the wire
byte layout (66 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
ShareAcknowledgeRequest message v0 [0x0000, 66B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 62 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 79 (ShareAcknowledge) [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 +-- ShareAcknowledgeRequest struct [0x000f, 51B] message body, version 0 +-- GroupId string = "" (compact, len+1=1) [0x000f, 1B] The group identifier. +-- MemberId string = "" (compact, len+1=1) [0x0010, 1B] The member ID. +-- ShareSessionEpoch int32 = 0 [0x0011, 4B] The current share session epoch: 0 to open a share session; -1 to close it;... +-- Topics []AcknowledgeTopic = 1 element [0x0015, 44B] The topics containing records to acknowledge. | +-- length uvarint = 2 (compact, n+1) [0x0015, 1B] one sample element follows | +-- AcknowledgeTopic[0] AcknowledgeTopic = struct [0x0016, 43B] | +-- TopicId uuid = 00000000-0000-0000-0000-000000000000 [0x0016, 16B] The unique topic ID. | +-- Partitions []AcknowledgePartition = 1 element [0x0026, 26B] The partitions containing records to acknowledge. | | +-- length uvarint = 2 (compact, n+1) [0x0026, 1B] one sample element follows | | +-- AcknowledgePartition[0] AcknowledgePartition = struct [0x0027, 25B] | | +-- PartitionIndex int32 = 0 [0x0027, 4B] The partition index. | | +-- AcknowledgementBatches []AcknowledgementBatch = 1 element [0x002b, 20B] Record batches to acknowledge. | | | +-- length uvarint = 2 (compact, n+1) [0x002b, 1B] one sample element follows | | | +-- AcknowledgementBatch[0] AcknowledgementBatch = struct [0x002c, 19B] | | | +-- FirstOffset int64 = 0 [0x002c, 8B] First offset of batch of records to acknowledge. | | | +-- LastOffset int64 = 0 [0x0034, 8B] Last offset (inclusive) of batch of records to acknowledge. | | | +-- AcknowledgeTypes []int8 = 1 element [0x003c, 2B] Array of acknowledge types - 0:Gap,1:Accept,2:Release,3:Reject. | | | | +-- length uvarint = 2 (compact, n+1) [0x003c, 1B] one sample element follows | | | | +-- int8[0] int8 = 0 [0x003d, 1B] | | | +-- tagged_fields uvarint = 0 [0x003e, 1B] number of tagged fields in this struct | | +-- tagged_fields uvarint = 0 [0x003f, 1B] number of tagged fields in this struct | +-- tagged_fields uvarint = 0 [0x0040, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0041, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 79, "type": "request", "listeners": ["broker"], "name": "ShareAcknowledgeRequest", "validVersions": "0", "flexibleVersions": "0+", // The ShareAcknowledgeRequest API is added as part of KIP-932 and is still under // development. Hence, the API is not exposed by default by brokers unless // explicitly enabled. "latestVersionUnstable": true, "fields": [ { "name": "GroupId", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", "entityType": "groupId", "about": "The group identifier." }, { "name": "MemberId", "type": "string", "versions": "0+", "nullableVersions": "0+", "about": "The member ID." }, { "name": "ShareSessionEpoch", "type": "int32", "versions": "0+", "about": "The current share session epoch: 0 to open a share session; -1 to close it; otherwise increments for consecutive requests." }, { "name": "Topics", "type": "[]AcknowledgeTopic", "versions": "0+", "about": "The topics containing records to acknowledge.", "fields": [ { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The unique topic ID."}, { "name": "Partitions", "type": "[]AcknowledgePartition", "versions": "0+", "about": "The partitions containing records to acknowledge.", "fields": [ { "name": "PartitionIndex", "type": "int32", "versions": "0+", "about": "The partition index." }, { "name": "AcknowledgementBatches", "type": "[]AcknowledgementBatch", "versions": "0+", "about": "Record batches to acknowledge.", "fields": [ { "name": "FirstOffset", "type": "int64", "versions": "0+", "about": "First offset of batch of records to acknowledge."}, { "name": "LastOffset", "type": "int64", "versions": "0+", "about": "Last offset (inclusive) of batch of records to acknowledge."}, { "name": "AcknowledgeTypes", "type": "[]int8", "versions": "0+", "about": "Array of acknowledge types - 0:Gap,1:Accept,2:Release,3:Reject."} ]} ]} ]} ] }
Response
ShareAcknowledgeResponse v0, response header v1, 65 bytes on the wire
byte layout (65 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
ShareAcknowledgeResponse message v0 [0x0000, 65B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 61 [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 +-- ShareAcknowledgeResponse struct [0x0009, 56B] 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 top level response error code. +-- ErrorMessage string = "" (compact, len+1=1) [0x000f, 1B] The top-level error message, or null if there was no error. +-- Responses []ShareAcknowledgeTopicResponse = 1 element [0x0010, 36B] The response topics. | +-- length uvarint = 2 (compact, n+1) [0x0010, 1B] one sample element follows | +-- ShareAcknowledgeTopicResponse[0] ShareAcknowledgeTopicResponse = struct [0x0011, 35B] | +-- TopicId uuid = 00000000-0000-0000-0000-000000000000 [0x0011, 16B] The unique topic ID. | +-- Partitions []PartitionData = 1 element [0x0021, 18B] The topic partitions. | | +-- length uvarint = 2 (compact, n+1) [0x0021, 1B] one sample element follows | | +-- PartitionData[0] PartitionData = struct [0x0022, 17B] | | +-- PartitionIndex int32 = 0 [0x0022, 4B] The partition index. | | +-- ErrorCode int16 = 0 [0x0026, 2B] The error code, or 0 if there was no error. | | +-- ErrorMessage string = "" (compact, len+1=1) [0x0028, 1B] The error message, or null if there was no error. | | +-- CurrentLeader LeaderIdAndEpoch = struct [0x0029, 9B] The current leader of the partition. | | | +-- LeaderId int32 = 0 [0x0029, 4B] The ID of the current leader or -1 if the leader is unknown. | | | +-- LeaderEpoch int32 = 0 [0x002d, 4B] The latest known leader epoch. | | | +-- tagged_fields uvarint = 0 [0x0031, 1B] number of tagged fields in this struct | | +-- 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 +-- NodeEndpoints []NodeEndpoint = 1 element [0x0034, 12B] Endpoints for all current leaders enumerated in PartitionData with error NO... | +-- length uvarint = 2 (compact, n+1) [0x0034, 1B] one sample element follows | +-- NodeEndpoint[0] NodeEndpoint = struct [0x0035, 11B] | +-- NodeId int32 = 0 [0x0035, 4B] The ID of the associated node. | +-- Host string = "" (compact, len+1=1) [0x0039, 1B] The node's hostname. | +-- Port int32 = 0 [0x003a, 4B] The node's port. | +-- Rack string = "" (compact, len+1=1) [0x003e, 1B] The rack of the node, or null if it has not been assigned to a rack. | +-- tagged_fields uvarint = 0 [0x003f, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0040, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 79, "type": "response", "name": "ShareAcknowledgeResponse", "validVersions": "0", "flexibleVersions": "0+", // Supported errors: // - GROUP_AUTHORIZATION_FAILED (version 0+) // - TOPIC_AUTHORIZATION_FAILED (version 0+) // - UNKNOWN_TOPIC_OR_PARTITION (version 0+) // - SHARE_SESSION_NOT_FOUND (version 0+) // - INVALID_SHARE_SESSION_EPOCH (version 0+) // - NOT_LEADER_OR_FOLLOWER (version 0+) // - UNKNOWN_TOPIC_ID (version 0+) // - INVALID_RECORD_STATE (version 0+) // - KAFKA_STORAGE_ERROR (version 0+) // - INVALID_REQUEST (version 0+) // - UNKNOWN_SERVER_ERROR (version 0+) "fields": [ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", "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+", "ignorable": true, "about": "The top level response error code." }, { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", "about": "The top-level error message, or null if there was no error." }, { "name": "Responses", "type": "[]ShareAcknowledgeTopicResponse", "versions": "0+", "about": "The response topics.", "fields": [ { "name": "TopicId", "type": "uuid", "versions": "0+", "ignorable": true, "about": "The unique topic ID."}, { "name": "Partitions", "type": "[]PartitionData", "versions": "0+", "about": "The topic partitions.", "fields": [ { "name": "PartitionIndex", "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": "CurrentLeader", "type": "LeaderIdAndEpoch", "versions": "0+", "about": "The current leader of the partition.", "fields": [ { "name": "LeaderId", "type": "int32", "versions": "0+", "about": "The ID of the current leader or -1 if the leader is unknown." }, { "name": "LeaderEpoch", "type": "int32", "versions": "0+", "about": "The latest known leader epoch." } ]} ]} ]}, { "name": "NodeEndpoints", "type": "[]NodeEndpoint", "versions": "0+", "about": "Endpoints for all current leaders enumerated in PartitionData with error NOT_LEADER_OR_FOLLOWER.", "fields": [ { "name": "NodeId", "type": "int32", "versions": "0+", "mapKey": true, "entityType": "brokerId", "about": "The ID of the associated node." }, { "name": "Host", "type": "string", "versions": "0+", "about": "The node's hostname." }, { "name": "Port", "type": "int32", "versions": "0+", "about": "The node's port." }, { "name": "Rack", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", "about": "The rack of the node, or null if it has not been assigned to a rack." } ]} ] }