Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ListTopics func to ClusterAdmin interface #1155

Closed
wants to merge 3 commits into from
Closed

Add ListTopics func to ClusterAdmin interface #1155

wants to merge 3 commits into from

Conversation

dnwe
Copy link
Collaborator

@dnwe dnwe commented Aug 22, 2018

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
Copy link
Contributor

birdayz commented Sep 15, 2018

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
Copy link
Contributor

birdayz commented Sep 27, 2018

what's missing for getting this merged?

@dnwe
Copy link
Collaborator Author

dnwe commented Feb 8, 2019

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