AndrewJSchofield commented on code in PR #16887:
URL: https://github.com/apache/kafka/pull/16887#discussion_r1718343472
##########
core/src/main/scala/kafka/admin/ConfigCommand.scala:
##########
@@ -562,6 +543,8 @@ object ConfigCommand extends Logging {
adminClient.describeCluster(new
DescribeClusterOptions()).nodes().get().asScala.map(_.idString).toSeq :+
BrokerDefaultEntityName
case ConfigType.CLIENT_METRICS =>
adminClient.listClientMetricsResources().all().get().asScala.map(_.name).toSeq
+ case ConfigType.GROUP =>
+ adminClient.listConsumerGroups(new
ListConsumerGroupsOptions().withTypes(Seq(GroupType.CONSUMER).toSet.asJava)).all.get.asScala.map(_.groupId).toSeq
Review Comment:
This is interesting. Because you've used `withTypes(GroupType.CONSUMER)`,
this only lists out the consumers which are using the new consumer group
protocol. So, I can set configs for classic consumer groups, but `--describe`
without a group name will not show them.
Really, the solution here I think is in KIP-1043 which adds
`adminClient.listGroups()` so that all groups regardless of type can be listed.
Once that KIP is approved, I'll improve this area. For now, I think
`Seq(GroupType.CONSUMER, GroupType.CLASSIC)` is probably the best you can do.
That does at least list out the configs for all new and classic consumer groups.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]