Search code examples
apache-kafkajmx

How to get JMX port without ZooKeeper (with bootstraper servers only)?


We can get jmx_port using zk node /brokers/ids/xxx. Now Kafka is moving to a ZooKeeper-free architecture, how do we get this info with only bootstrap servers? Is it even possible?


Solution

  • Kafka is a Java process, so yes, it's possible.

    There's an environment variable JMX_PORT used when the broker starts that you can ask your server administrators to set/document - https://github.com/apache/kafka/blob/3.2/bin/kafka-run-class.sh#L213