Metadata API
A metadata request is a Kafka client request that retrieves information about cluster brokers, topics, partitions, leadership, and assignments.
Kafka for Architects
A metadata request is a Kafka client request that retrieves cluster metadata such as partition leadership and broker assignments.
- How it is used
- Routes producer writes to current partition leaders by retrieving broker and partition assignments.
- How deep it goes
- Explains discovery, caching, refresh timing, and recovery from leadership changes without detailing protocol encoding.
- Examples
- Uses cached broker mappings, five-minute refreshes, stale-leader errors, and batch resends as concrete operational examples.
- What you can do after
- Diagnose producer routing failures by recognizing stale metadata and the client refresh-and-retry response.
Apache Kafka in Action
A metadata request is a Kafka client request that retrieves information about topics, partitions, brokers, and partition leaders.
- How it is used
- Connects Kafka clients to the brokers and partition leaders required for producing or consuming messages.
- How deep it goes
- Explains request flow, cached cluster information, leader discovery, and failure recovery without detailing the request protocol.
- Examples
- Demonstrates kafka-topics.sh with one broker, multiple bootstrap servers, and a figure showing client-to-leader discovery.
- What you can do after
- Operate/configure Kafka clients with resilient bootstrap addresses and understand how they recover connections after leader changes.
Related concepts
- clientused by · A client is a person, organization, device, or software component that receives or uses a product, service, resource, or functionality provided by another entity.
- producerused by · A producer is an entity or process that creates or supplies values, data, messages, events, or work for another entity to consume.
- metadataproduces · Metadata is information that describes, identifies, or provides context about other data, resources, or artifacts.
- Kafka brokerproduces · A Kafka broker is a server process in an Apache Kafka cluster that stores records and handles producer, consumer, and other client requests.
- partitionproduces · A partition is a distinct subdivision of a larger data, storage, or work unit that can be stored, managed, or processed separately.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

