...
- Download the latest Kafka release and extract it - https://kafka.apache.org/quickstart
- Navigate to the bin directory kafka_2.12-2.7.0/bin/ - we will be using kafka-topics.sh and kafka-configs.sh scripts out of the box
- Get list of topics and write to file topics.txt. Every topic will be on a separate line. For example, we want all topics for tenant tenant001
Code Block language bash theme Midnight title create-topics-file.sh #!/bin/bash -e source ./kafka-topics.sh --describe --zookeeper <zookeeper-plaintext-connection-url> --topic "imtc.Default.tenant001.*" | grep Configs | awk '{printf "%s\n", $2}' > topics.txt
...