Process Flow - ZooKeeper role (and KRaft replacement)
Kafka Broker starts
Connect to ZooKeeper?
No→Use KRaft mode
|Yes
Register Broker in ZooKeeper
ZooKeeper manages cluster metadata
Brokers coordinate via ZooKeeper
Client requests handled
Cluster state updated in ZooKeeper
If KRaft mode
Kafka manages metadata internally
Cluster operates without ZooKeeper
Kafka brokers either connect to ZooKeeper to manage cluster metadata or use KRaft mode where Kafka manages metadata internally without ZooKeeper.