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.
Also covered in
What to know first
- offsetAn offset is a position or displacement measured relative to a reference point, such as within an ordered sequence, memory region, or layout.
Related concepts
- clientused by · A client is a person, organization, device, or software component that requests, receives, or uses a product, service, resource, or capability provided by another party or system.
- producerused by · A producer is a person, component, or computation that generates or supplies data, messages, values, events, or work for another entity to consume or process.
- metadataproduces · Metadata is information that describes 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 division of a whole into distinct parts that together cover it, typically without overlap.
Questions about metadata API
What is metadata API?
A metadata request is a Kafka client request that retrieves information about cluster brokers, topics, partitions, leadership, and assignments.
Which Manning books explain metadata API?
Kafka for Architects and Apache Kafka in Action.
What should I know before learning metadata API?
Manning books that teach metadata API usually introduce offset first.
What is metadata API also called?
Metadata API is also called metadata request.
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.

