Process Flow - Leader election
Start: Kafka Cluster
Broker Startup
Broker Registers with Zookeeper
Zookeeper Elects Controller
Controller Assigns Partition Leaders
Brokers Accept Leader Roles
Cluster Ready for Requests
Kafka brokers start and register with Zookeeper, which elects a controller broker. The controller assigns leaders for partitions, enabling the cluster to handle requests.