Junior — Middle
What components and subdivisions exist within a Kafka Topic?
sobes.tech AI
Answer from AI
In Kafka, a Topic is a logical entity for organizing messages. Inside a Topic, there are several key components:
- Partitions: A Topic is divided into multiple partitions. Each partition is an ordered, immutable log of messages to which new entries are added.
- Replicas: Each partition can have multiple replicas to ensure fault tolerance. One replica is the leader, and the others are followers.
- Leader and Followers: The leader of a partition handles all write and read operations, while followers synchronize data with the leader.
Thus, a Topic is a collection of partitions, each having replicas distributed across brokers for scalability and reliability.