Using this library, I was able to get the partition count per topic
but not able to get the replication factor
. Closest question I could find was this for reference.
Any ideas on how to do it?
Asked
Active
Viewed 562 times
0

OneCricketeer
- 179,855
- 19
- 132
- 245

Tushar
- 528
- 4
- 20
1 Answers
3
If you use confluent-kafka library,
Create AdminClient
Then ListTopics
It will return ClusterMetaData
Then, use topics' metadata from ClusterMetaData
TopicMetadata has Partitions' metadata which has replica details

Gibbs
- 21,904
- 13
- 74
- 138
-
1Thanks a lot, this works! It was also easy getting the `configurations` by using `name` and `value` attributes. – Tushar May 26 '22 at 14:20