I'm doing the following:
var listTopicOptions = ListTopicsOptions().listInternal(false)
var topicsInKafka = adminClient().listTopics(listTopicOptions).names().get()
But I'm still getting topic names likes xxx-kstreams-yyyy-changelog or xxx.internal.self.yyy
No, you can't avoid those topic names by setting listInternal(false)
. As mentioned, it will exclude kafka _consumer_offsets
and _transaction_state
topics.
If you don't want to see the kafka stream application generated changelog/repartition topics, you can define a regex in your code which can exclude all the topics matching and give you only user topics.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.