I need to find out a way to ask Kafka for a list of topics. I know I can do that using the kafka-topics.sh script included in the bin\\ directory.
kafka-topics.sh
bin\\
Use kafka-consumer-groups.sh
For example
bin/kafka-consumer-groups.sh --list --bootstrap-server localhost:9092 bin/kafka-consumer-groups.sh --describe --group mygroup --bootstrap-server localhost:9092