Introduction
In Kafka, the controller broker is a special broker that manages cluster-wide actions like topic partition leadership and broker membership. It helps keep the cluster organized and running smoothly by coordinating these tasks.
When a Kafka broker starts and needs to know if it should become the controller.
When a broker fails and leadership of partitions must be reassigned.
When new brokers join the cluster and the cluster metadata needs updating.
When partitions are created or deleted and leadership must be assigned.
When you want to monitor which broker is currently the controller for troubleshooting.