Partition Leader

At any time, only one Broker can be a Partition Leader for a given Partition.

Producers can only send data to the Broker that is a Partition Leader.

Consumers can only request data from the Broker that is Partition Leader.

Note

Since Kafka v2.4, it's possible to read from the closest replica.

Warning

If you are setting up a modern-day Kafka implementation, do not use Zookeeper as a configuration in your Kafka clients, and other programs that connect to Kafka

Pasted image 20230301214746.webp

References

Flashcards

How many Brokers can be a Partition Leader for a given Partition?:: 1

Producers can only send data to:: The Partition Leader

Consumers can request data from:: The closest In-sync Replica or the Partition Leader