How to check the Kafka version remotely
Codemia Knowledge Hub ·
To find the Kafka version on a remote broker, run kafka-broker-api-versions.sh --bootstrap-server <broker_host:port> from a Kafka installation, ask a client library such as kafka-python for the broker version, or read the version over JMX. Knowing the version matters when troubleshooting, upgrading or checking compatibility with clients and other components.
kafka-broker-api-versions.sh
Kafka ships this tool in its installation directory:
It connects to the broker and prints the API versions the broker supports, which indirectly tells you the Kafka version.
From a client library
For automated monitoring or integration, query the broker through a Kafka client library. Libraries exist for Java, Python (confluent-kafka or kafka-python), Node.js and others. With kafka-python:
Over JMX
Kafka exposes metrics and runtime information, including its version, over JMX. The JMX port has to be open and reachable remotely. It is set with the JMX_PORT environment variable when the broker starts:
Then use a JMX tool such as jconsole, visualvm or jmxterm. With jmxterm:
The MBean name includes the broker's broker.id (for example id=0). This returns the version of the Kafka instance on that broker.
Security and access considerations
- Network security: make sure Kafka and its ports are reachable only by authorized clients.
- Broker configuration: access can depend on the broker's security settings, such as SASL/SSL.
- Compatibility: Kafka clients and tools vary in how well they work with different Kafka versions.
| Method | Tool/Approach | Remarks |
| Command Line | kafka-broker-api-versions.sh | Direct and requires CLI access to server. |
| Programmatically | Kafka Client Libraries | Flexible and integrates into applications. |
| Java Management Extensions (JMX) | jmxterm, jconsole | Requires JMX to be enabled on the broker. |
Related reading
- Find partition(s) assigned to Kafka stream instance
- Find running median from a stream of integers
- Fixing under replicated partitions in kafka
- Flask + RabbitMQ + SocketIO - forwarding messages
- Find out which remote branch a local branch is tracking
- Find size of Git repository
- Flask API as real time kafka consumer
- Flink Kafka connector - commit offset without checkpointing

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.