DescribeTopicPartitions
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
- 75
- Encoded at
- v0
- Flexible versions
- 0+
- Headers
- req v2, resp v1
- Request versions
- 0
- Response versions
- 0
- Request size
- 29 bytes
- Response size
- 87 bytes
framerpc headerrequest bodyRecordBatchRecordresponse bodytagged_fields
Request
DescribeTopicPartitionsRequest v0, request header v2, 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
DescribeTopicPartitionsRequest message v0 [0x0000, 29B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 25 [0x0000, 4B] number of bytes that follow, patched after encoding +-- RequestHeader v2 [0x0004, 11B] common request header | +-- request_api_key int16 = 75 (DescribeTopicPartitions) [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 +-- DescribeTopicPartitionsRequest struct [0x000f, 14B] message body, version 0 +-- Topics []TopicRequest = 1 element [0x000f, 3B] The topics to fetch details for. | +-- length uvarint = 2 (compact, n+1) [0x000f, 1B] one sample element follows | +-- TopicRequest[0] TopicRequest = struct [0x0010, 2B] | +-- Name string = "" (compact, len+1=1) [0x0010, 1B] The topic name. | +-- tagged_fields uvarint = 0 [0x0011, 1B] number of tagged fields in this struct +-- ResponsePartitionLimit int32 = 0 [0x0012, 4B] The maximum number of partitions included in the response. +-- Cursor Cursor = struct [0x0016, 6B] The first topic and partition index to fetch details for. | +-- TopicName string = "" (compact, len+1=1) [0x0016, 1B] The name for the first topic to process. | +-- PartitionIndex int32 = 0 [0x0017, 4B] The partition index to start with. | +-- 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": 75, "type": "request", "listeners": ["broker"], "name": "DescribeTopicPartitionsRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "Topics", "type": "[]TopicRequest", "versions": "0+", "about": "The topics to fetch details for.", "fields": [ { "name": "Name", "type": "string", "versions": "0+", "entityType": "topicName", "about": "The topic name." } ] }, { "name": "ResponsePartitionLimit", "type": "int32", "versions": "0+", "default": "2000", "about": "The maximum number of partitions included in the response." }, { "name": "Cursor", "type": "Cursor", "versions": "0+", "nullableVersions": "0+", "default": "null", "about": "The first topic and partition index to fetch details for.", "fields": [ { "name": "TopicName", "type": "string", "versions": "0+", "entityType": "topicName", "about": "The name for the first topic to process." }, { "name": "PartitionIndex", "type": "int32", "versions": "0+", "about": "The partition index to start with." } ]} ] }
Response
DescribeTopicPartitionsResponse v0, response header v1, 87 bytes on the wire
byte layout (87 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
0050
object tree
DescribeTopicPartitionsResponse message v0 [0x0000, 87B] +-- Frame [0x0000, 4B] length-delimited framing | +-- size int32 = 83 [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 +-- DescribeTopicPartitionsResponse struct [0x0009, 78B] message body, version 0 +-- ThrottleTimeMs int32 = 0 [0x0009, 4B] The duration in milliseconds for which the request was throttled due to a q... +-- Topics []DescribeTopicPartitionsResponseTopic = 1 element [0x000d, 67B] Each topic in the response. | +-- length uvarint = 2 (compact, n+1) [0x000d, 1B] one sample element follows | +-- DescribeTopicPartitionsResponseTopic[0] DescribeTopicPartitionsResponseTopic = struct [0x000e, 66B] | +-- ErrorCode int16 = 0 [0x000e, 2B] The topic error, or 0 if there was no error. | +-- Name string = "" (compact, len+1=1) [0x0010, 1B] The topic name. | +-- TopicId uuid = 00000000-0000-0000-0000-000000000000 [0x0011, 16B] The topic id. | +-- IsInternal bool = false [0x0021, 1B] True if the topic is internal. | +-- Partitions []DescribeTopicPartitionsResponsePartition = 1 element [0x0022, 41B] Each partition in the topic. | | +-- length uvarint = 2 (compact, n+1) [0x0022, 1B] one sample element follows | | +-- DescribeTopicPartitionsResponsePartition[0] DescribeTopicPartitionsResponsePartition = struct [0x0023, 40B] | | +-- ErrorCode int16 = 0 [0x0023, 2B] The partition error, or 0 if there was no error. | | +-- PartitionIndex int32 = 0 [0x0025, 4B] The partition index. | | +-- LeaderId int32 = 0 [0x0029, 4B] The ID of the leader broker. | | +-- LeaderEpoch int32 = 0 [0x002d, 4B] The leader epoch of this partition. | | +-- ReplicaNodes []int32 = 1 element [0x0031, 5B] The set of all nodes that host this partition. | | | +-- length uvarint = 2 (compact, n+1) [0x0031, 1B] one sample element follows | | | +-- int32[0] int32 = 0 [0x0032, 4B] | | +-- IsrNodes []int32 = 1 element [0x0036, 5B] The set of nodes that are in sync with the leader for this partition. | | | +-- length uvarint = 2 (compact, n+1) [0x0036, 1B] one sample element follows | | | +-- int32[0] int32 = 0 [0x0037, 4B] | | +-- EligibleLeaderReplicas []int32 = 1 element [0x003b, 5B] The new eligible leader replicas otherwise. | | | +-- length uvarint = 2 (compact, n+1) [0x003b, 1B] one sample element follows | | | +-- int32[0] int32 = 0 [0x003c, 4B] | | +-- LastKnownElr []int32 = 1 element [0x0040, 5B] The last known ELR. | | | +-- length uvarint = 2 (compact, n+1) [0x0040, 1B] one sample element follows | | | +-- int32[0] int32 = 0 [0x0041, 4B] | | +-- OfflineReplicas []int32 = 1 element [0x0045, 5B] The set of offline replicas of this partition. | | | +-- length uvarint = 2 (compact, n+1) [0x0045, 1B] one sample element follows | | | +-- int32[0] int32 = 0 [0x0046, 4B] | | +-- tagged_fields uvarint = 0 [0x004a, 1B] number of tagged fields in this struct | +-- TopicAuthorizedOperations int32 = 0 [0x004b, 4B] 32-bit bitfield to represent authorized operations for this topic. | +-- tagged_fields uvarint = 0 [0x004f, 1B] number of tagged fields in this struct +-- NextCursor Cursor = struct [0x0050, 6B] The next topic and partition index to fetch details for. | +-- TopicName string = "" (compact, len+1=1) [0x0050, 1B] The name for the first topic to process. | +-- PartitionIndex int32 = 0 [0x0051, 4B] The partition index to start with. | +-- tagged_fields uvarint = 0 [0x0055, 1B] number of tagged fields in this struct +-- tagged_fields uvarint = 0 [0x0056, 1B] number of tagged fields in this struct
kafka message schema (.json)
{ "apiKey": 75, "type": "response", "name": "DescribeTopicPartitionsResponse", "validVersions": "0", "flexibleVersions": "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": "Topics", "type": "[]DescribeTopicPartitionsResponseTopic", "versions": "0+", "about": "Each topic in the response.", "fields": [ { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The topic error, or 0 if there was no error." }, { "name": "Name", "type": "string", "versions": "0+", "mapKey": true, "entityType": "topicName", "nullableVersions": "0+", "about": "The topic name." }, { "name": "TopicId", "type": "uuid", "versions": "0+", "ignorable": true, "about": "The topic id." }, { "name": "IsInternal", "type": "bool", "versions": "0+", "default": "false", "ignorable": true, "about": "True if the topic is internal." }, { "name": "Partitions", "type": "[]DescribeTopicPartitionsResponsePartition", "versions": "0+", "about": "Each partition in the topic.", "fields": [ { "name": "ErrorCode", "type": "int16", "versions": "0+", "about": "The partition error, or 0 if there was no error." }, { "name": "PartitionIndex", "type": "int32", "versions": "0+", "about": "The partition index." }, { "name": "LeaderId", "type": "int32", "versions": "0+", "entityType": "brokerId", "about": "The ID of the leader broker." }, { "name": "LeaderEpoch", "type": "int32", "versions": "0+", "default": "-1", "ignorable": true, "about": "The leader epoch of this partition." }, { "name": "ReplicaNodes", "type": "[]int32", "versions": "0+", "entityType": "brokerId", "about": "The set of all nodes that host this partition." }, { "name": "IsrNodes", "type": "[]int32", "versions": "0+", "entityType": "brokerId", "about": "The set of nodes that are in sync with the leader for this partition." }, { "name": "EligibleLeaderReplicas", "type": "[]int32", "default": "null", "entityType": "brokerId", "versions": "0+", "nullableVersions": "0+", "about": "The new eligible leader replicas otherwise." }, { "name": "LastKnownElr", "type": "[]int32", "default": "null", "entityType": "brokerId", "versions": "0+", "nullableVersions": "0+", "about": "The last known ELR." }, { "name": "OfflineReplicas", "type": "[]int32", "versions": "0+", "ignorable": true, "entityType": "brokerId", "about": "The set of offline replicas of this partition." }]}, { "name": "TopicAuthorizedOperations", "type": "int32", "versions": "0+", "default": "-2147483648", "about": "32-bit bitfield to represent authorized operations for this topic." }] }, { "name": "NextCursor", "type": "Cursor", "versions": "0+", "nullableVersions": "0+", "default": "null", "about": "The next topic and partition index to fetch details for.", "fields": [ { "name": "TopicName", "type": "string", "versions": "0+", "entityType": "topicName", "about": "The name for the first topic to process." }, { "name": "PartitionIndex", "type": "int32", "versions": "0+", "about": "The partition index to start with." } ]} ] }