conduktor.io ↗

Kafka Metadata Changelog — Protocol Version History

What is Metadata?

The first API every client calls after connecting, and re-called on NOT_LEADER or UNKNOWN_TOPIC_OR_PARTITION errors. A surge in Metadata requests signals partition leaders are moving around, typically during rolling restarts, broker failures, or reassignments.

VersionKafkaChanges
MetadataRequest
v02.2
+ Topics []MetadataRequestTopic
+ Name string
v12.2
~ Topics became nullable
v22.2
are the same as version 1.
v32.2
are the same as version 1.
v42.2
+ AllowAutoTopicCreation bool
adds AllowAutoTopicCreation.
v52.2No changes
v62.2No changes
v72.2No changes
v82.3
+ IncludeClusterAuthorizedOperations bool
+ IncludeTopicAuthorizedOperations bool
authorized operations can be requested for cluster and topic resource.
v92.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
v102.8
+ TopicId uuid
~ Name became nullable
should not use the topicId field or set topic name to null.
v112.8
- IncludeClusterAuthorizedOperations bool
deprecates IncludeClusterAuthorizedOperations field. This is now exposed by the DescribeCluster API (KIP-700).
v123.1
supports topic Id.
v134.0
supports top-level error code in the response.
MetadataResponse
v02.2
+ Brokers []MetadataResponseBroker
+ NodeId int32
+ Host string
+ Port int32
+ Topics []MetadataResponseTopic
+ ErrorCode int16
+ Name string
+ Partitions []MetadataResponsePartition
+ ErrorCode int16
+ PartitionIndex int32
+ LeaderId int32
+ ReplicaNodes []int32
+ IsrNodes []int32
v12.2
+ Rack string
+ ControllerId int32
+ IsInternal bool
adds fields for the rack of each broker, the controller id, and whether or not the topic is internal.
v22.2
+ ClusterId string
adds the cluster ID field.
v32.2
+ ThrottleTimeMs int32
adds the throttle time.
v42.2
is the same as version 3.
v52.2
+ OfflineReplicas []int32
adds a per-partition offline_replicas field. This field specifies the list of replicas that are offline.
v62.2
on quota violation, brokers send out responses before throttling.
v72.2
+ LeaderEpoch int32
adds the leader epoch to the partition metadata.
v82.3
+ TopicAuthorizedOperations int32
+ ClusterAuthorizedOperations int32
brokers can send authorized operations for topic and cluster.
v92.4
~ Flexible encoding enabled FLEXIBLE
is the first flexible version.
v102.8
+ TopicId uuid
adds topicId.
v112.8
- ClusterAuthorizedOperations int32
deprecates ClusterAuthorizedOperations. This is now exposed by the DescribeCluster API (KIP-700).
v123.1
~ Name became nullable
supports topicId.
v134.0
+ ErrorCode int16
supports top-level error code in the response.