How to list topics without accessing Zookeeper in Kafka? - Big Data In Real World

How to list topics without accessing Zookeeper in Kafka?

How to add total count of DataFrame to an already grouped DataFrame?
May 22, 2023
How to kill multiple YARN applications at once?
June 5, 2023
How to add total count of DataFrame to an already grouped DataFrame?
May 22, 2023
How to kill multiple YARN applications at once?
June 5, 2023

Kafka uses Zookeeper to manage it’s internal state. So it is not possible to run Kafka without Zookeeper. Even if you don’t have access to Zookeeper in your organization, there is a Zookeeper cluster running which your Kafka cluster connects to.

So, how to list topics and execute other commands if we don’t have access to Zookeeper?

Kafka 2.2+

This is truly not a problem with Kafka version 2.2 and above. This is because the –zookeeper option  is deprecated in favor of the –bootstrap-server option.

bin/kafka-topics.sh --list --bootstrap-server <BROKER-HOST:PORT>

Kafka 2.1 and below

With Kafka 2.1 and below you would need access to the Zookeeper nodes to run most Kafka CLI commands. Like below –

bin/kafka-topics.sh --list --zookeeper <ZOOKEEPER-HOST:PORT>
Big Data In Real World
Big Data In Real World
We are a group of Big Data engineers who are passionate about Big Data and related Big Data technologies. We have designed, developed, deployed and maintained Big Data applications ranging from batch to real time streaming big data platforms. We have seen a wide range of real world big data problems, implemented some innovative and complex (or simple, depending on how you look at it) solutions.

1 Comment

  1. […] The BIg Data in Real World team has a quick one for us: […]

How to list topics without accessing Zookeeper in Kafka?
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Hadoop In Real World is now Big Data In Real World!

X