Skip to content

Add ListTopics func to ClusterAdmin interface#1155

Closed
dnwe wants to merge 3 commits into
IBM:masterfrom
dnwe:admin-list-topics
Closed

Add ListTopics func to ClusterAdmin interface#1155
dnwe wants to merge 3 commits into
IBM:masterfrom
dnwe:admin-list-topics

Conversation

@dnwe

@dnwe dnwe commented Aug 22, 2018

Copy link
Copy Markdown
Collaborator

Currently the Sarama ClusterAdmin client (added under #1055) didn't have anything analogous to the Java client's AdminClient#listTopics() command.

This PR is to add one which will return an up-to-date map of all topics in the cluster and any non-default topic configuration that they have.

@birdayz

birdayz commented Sep 15, 2018

Copy link
Copy Markdown
Contributor

I feel the returned structure is insufficient..but it does too much at the same time.
TopicDetail is actually used to create topics, so i'm not sure if it's appropriate here.

For example, i'm missing the 'is internal' flag.
I'm all for being rather close to the 'official' java kafka-client; for reference they return the following structure: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/TopicListing.java.

So it just returns the names of the topics. Pretty much what your code does as well - first just fetch topics. and then the configurations of the topics. I wonder, since this involves multiple network roundtrips - wouldn't it be better to leave the choice to fetch further details to the user, e.g. he calls ListTopics(), gets just the names, and then he calls DescribeTopic (i'm currently working on a PR to add this one) to fetch the details.

@birdayz

birdayz commented Sep 27, 2018

Copy link
Copy Markdown
Contributor

what's missing for getting this merged?

@dnwe

dnwe commented Feb 8, 2019

Copy link
Copy Markdown
Collaborator Author

Thanks to @birdayz the commits from this PR were included in the follow on #1178 and have now been merged to master so closing this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants