Search in sources :

Example 1 with DescribeConsumerGroupsHandler

use of org.apache.kafka.clients.admin.internals.DescribeConsumerGroupsHandler in project kafka by apache.

the class KafkaAdminClient method describeConsumerGroups.

@Override
public DescribeConsumerGroupsResult describeConsumerGroups(final Collection<String> groupIds, final DescribeConsumerGroupsOptions options) {
    SimpleAdminApiFuture<CoordinatorKey, ConsumerGroupDescription> future = DescribeConsumerGroupsHandler.newFuture(groupIds);
    DescribeConsumerGroupsHandler handler = new DescribeConsumerGroupsHandler(options.includeAuthorizedOperations(), logContext);
    invokeDriver(handler, future, options.timeoutMs);
    return new DescribeConsumerGroupsResult(future.all().entrySet().stream().collect(Collectors.toMap(entry -> entry.getKey().idValue, Map.Entry::getValue)));
}
Also used : CoordinatorKey(org.apache.kafka.clients.admin.internals.CoordinatorKey) DescribeConsumerGroupsHandler(org.apache.kafka.clients.admin.internals.DescribeConsumerGroupsHandler)

Aggregations

CoordinatorKey (org.apache.kafka.clients.admin.internals.CoordinatorKey)1 DescribeConsumerGroupsHandler (org.apache.kafka.clients.admin.internals.DescribeConsumerGroupsHandler)1