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
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
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:
You can also do it using the JSON output and filter it with
jq
: