apache-kafkakraft

Kafka 3.3 with Kraft - Controller ID keeps changing every second


I have a three node Kafka cluster with Kraft and without Zookeeper. The cluster Controller ID changes almost every second. Is this normal? As I understand, it should change only when some fault in the cluster forces re-election.

Kafka Version: 3.3


Solution

  • Yes - this is normal.

    Taken from this answer: https://stackoverflow.com/a/74782278/126769 :

    When using KRaft, a cluster no longer has a single controller. Instead, nodes in the cluster that are running with the "controller" role, all take part in the controller metadata quorum.

    The reason that tools are reporting seemingly random IDs is because of an intentional choice to return a random controller participant ID in the existing metadata APIs.