From the course: Apache Kafka Essential Training: Building Scalable Applications (2021)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Partition leaders

Partition leaders

- In the last video we discussed how replication uses brokers as partitioned leaders. Now let's continue to explore more on how partition leaders work. The broker instance that owns the leader replica of a partition is called the partition leader. The controller will assign partition leaders for partitions during topic creation. A Kafka producer, when publishing a message will choose a partition for a message and will send the message to the corresponding partition leader. Similarly, a Kafka consumer will work directly with the partition leader to consume messages in that partition. The partition leader also stores partition data in its log files. What about follower brokers? Brokers that own the follower replicas for a partition are called follower brokers. Do note that the same broker can be the partition leader for some partitions and the follower broker for other partitions. Follower brokers subscribe with the…

Contents