OffsetDelete
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 predates flexible versions, so lengths are fixed-width int16 and int32 prefixes and there are no tagged-field trailers. Sizes below include the leading int32 size prefix.
- API key
- 47
- Encoded at
- v0
- Flexible versions
- none
- Headers
- req v1, resp v0
- Request versions
- 0
- Response versions
- 0
- Request size
- 30 bytes
- Response size
- 30 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
OffsetDeleteRequest v0, request header v1, 30 bytes on the wire
byte layout (30 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
OffsetDeleteRequest message v0 [0x0000, 30B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 26 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v1 [0x0004, 10B] common request header | +-- request_api_key int16 = 47 (OffsetDelete) [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 +-- OffsetDeleteRequest struct [0x000e, 16B] message body, version 0 +-- GroupId string = "" (int16 len=0) [0x000e, 2B] The unique group identifier. +-- Topics []OffsetDeleteRequestTopic = 1 element [0x0010, 14B] The topics to delete offsets for. +-- length int32 = 1 [0x0010, 4B] one sample element follows +-- OffsetDeleteRequestTopic[0] OffsetDeleteRequestTopic = struct [0x0014, 10B] +-- Name string = "" (int16 len=0) [0x0014, 2B] The topic name. +-- Partitions []OffsetDeleteRequestPartition = 1 element [0x0016, 8B] Each partition to delete offsets for. +-- length int32 = 1 [0x0016, 4B] one sample element follows +-- OffsetDeleteRequestPartition[0] OffsetDeleteRequestPartition = struct [0x001a, 4B] +-- PartitionIndex int32 = 0 [0x001a, 4B] The partition index.
kafka message schema (.json)
{ "apiKey": 47, "type": "request", "listeners": ["broker"], "name": "OffsetDeleteRequest", "validVersions": "0", "flexibleVersions": "none", "fields": [ { "name": "GroupId", "type": "string", "versions": "0+", "entityType": "groupId", "about": "The unique group identifier." }, { "name": "Topics", "type": "[]OffsetDeleteRequestTopic", "versions": "0+", "about": "The topics to delete offsets for.", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName", "about": "The topic name." }, { "name": "Partitions", "type": "[]OffsetDeleteRequestPartition", "versions": "0+", "about": "Each partition to delete offsets for.", "fields": [ { "name": "PartitionIndex", "type": "int32", "versions": "0+", "about": "The partition index." } ] } ] } ] }
Response
OffsetDeleteResponse v0, response header v0, 30 bytes on the wire
byte layout (30 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
OffsetDeleteResponse message v0 [0x0000, 30B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 26 [0x0000, 4B] number of bytes that follow, patched after encoding +-- ResponseHeader v0 [0x0004, 4B] common response header | +-- correlation_id int32 = 0 [0x0004, 4B] matches the correlation_id of the request +-- OffsetDeleteResponse struct [0x0008, 22B] message body, version 0 +-- ErrorCode int16 = 0 [0x0008, 2B] The top-level error code, or 0 if there was no error. +-- ThrottleTimeMs int32 = 0 [0x000a, 4B] The duration in milliseconds for which the request was throttled due to a q... +-- Topics []OffsetDeleteResponseTopic = 1 element [0x000e, 16B] The responses for each topic. +-- length int32 = 1 [0x000e, 4B] one sample element follows +-- OffsetDeleteResponseTopic[0] OffsetDeleteResponseTopic = struct [0x0012, 12B] +-- Name string = "" (int16 len=0) [0x0012, 2B] The topic name. +-- Partitions []OffsetDeleteResponsePartition = 1 element [0x0014, 10B] The responses for each partition in the topic. +-- length int32 = 1 [0x0014, 4B] one sample element follows +-- OffsetDeleteResponsePartition[0] OffsetDeleteResponsePartition = struct [0x0018, 6B] +-- PartitionIndex int32 = 0 [0x0018, 4B] The partition index. +-- ErrorCode int16 = 0 [0x001c, 2B] The error code, or 0 if there was no error.
kafka message schema (.json)
{ "apiKey": 47, "type": "response", "name": "OffsetDeleteResponse", "validVersions": "0", "flexibleVersions": "none", "fields": [ { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The top-level error code, or 0 if there was no error." }, { "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": "Topics", "type": "[]OffsetDeleteResponseTopic", "versions": "0+", "about": "The responses for each topic.", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName", "about": "The topic name." }, { "name": "Partitions", "type": "[]OffsetDeleteResponsePartition", "versions": "0+", "about": "The responses for each partition in the topic.", "fields": [ { "name": "PartitionIndex", "type": "int32", "versions": "0+", "mapKey": true, "about": "The partition index." }, { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The error code, or 0 if there was no error." } ] } ] } ] }