Managing
Kafka Topics
@jaceklaskowski
/
StackOverflow
/
GitHub
/
LinkedIn
The "Internals" Books:
books.japila.pl
## Agenda 1. [Topic](#/topic) 1. [Replica](#/replica) 1. [In-Sync Replica](#/in-sync-replica) 1. [kafka-topics Shell Script](#/kafka-topics-shell-script)
## Topic * A namespace of **partitions** * Identified by a **name** * Available on all brokers in a Kafka cluster
## Replica * **Replica** is a copy of a partition * Number of replicas (of a topic) is **replication factor** * Exactly one replica is the **leader** while others are **followers**
## In-Sync Replica * **In-Sync Replica** is a replica that has enough records to be considered in partition leader election * Number of records is close to the number of records in the partition on the leader
## kafka-topics Shell Script * **kafka-topics** shell script allows you to manage topics * **--create** - creates a new topic * **--delete** - deletes a topic * **--describe** - shows the details of a topic * **--alter** - changes a topic * **--list** - lists all topics
## Recap 1. [Topic](#/topic) 1. [Replica](#/replica) 1. [In-Sync Replica](#/in-sync-replica) 1. [kafka-topics Shell Script](#/kafka-topics-shell-script)
# Questions? * Read [The Internals of Apache Kafka](https://books.japila.pl/kafka-internals/) * Read [The Internals of Kafka Streams](https://books.japila.pl/kafka-streams-internals) * Read [The Internals of ksqlDB](https://books.japila.pl/ksqldb-internals/) * Follow [@jaceklaskowski](https://twitter.com/jaceklaskowski) on twitter (DMs open) * Upvote [my questions and answers on StackOverflow](http://stackoverflow.com/users/1305344/jacek-laskowski) * Contact me at **jacek@japila.pl**