We're a place where coders share, stay up-to-date and grow their careers.
Hi Rakesh, You could use a -L option without topic parameter. That will list all the topics. Do note that it will also list topic partitions. For this job I would rather recommend kafka-topics command:
kafka-topics --bootstrap-server localhost:9092 --list
You can also do it using the JSON output and filter it with jq:
jq
kafkacat -b broker:29092 -L -J | \ jq '.topics[].topic'| sort
Hi Rakesh,
You could use a -L option without topic parameter. That will list all the topics. Do note that it will also list topic partitions. For this job I would rather recommend kafka-topics command:
You can also do it using the JSON output and filter it with
jq
: