liveBook · Manning

Administrative API

As explained in Kafka Streams in Action, Second Edition

AdminClient is Kafka's abstract administrative client class for performing operations on cluster resources.

Kafka’s administrative API performs cluster-resource operations programmatically. The preferred type is the Admin interface; the abstract AdminClient class is discouraged and may be removed in a future release. section 4.1 section 4.5

Use it to inspect topics, brokers, ACLs, and configuration, or to create, list, delete, describe, and modify topics and records. Topic management is especially useful for testing and prototyping, while production broker administration commonly remains an operations responsibility. section 4.5

A typical administrative workflow is:

  • Resolve ListTopicResult.names() through KafkaFuture.get(), which blocks until the request completes. section 4.5

Create and remove development topics

Configure localhost:9092, create an Admin client, add topic-one and topic-two as single-partition, single-replica topics, list their names, and delete topic-two. Run destructive operations cautiously in shared environments. section 4.5

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains topic creation, listing, deletion, asynchronous name retrieval, and client lifecycle, while deferring many similar methods.
Examples
Demonstrates Java code that creates, lists, and deletes local Kafka topics using localhost:9092.
What it assumes
Assumes a reachable Kafka broker and bootstrap-server configuration while introducing administrative client operations from concrete Java examples.
What you can do after
Operate/configure Kafka topics programmatically for testing and prototyping with the Admin interface.
How it connects
Connects topics, partitions, records, brokers, ACLs, configuration, and consumer groups through Kafka administration.

Also explained in

Compare how 2 books explain administrative API →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.