Search in sources :

Example 1 with DeleteConsumerGroupsHandler

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

the class KafkaAdminClient method deleteConsumerGroups.

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

Aggregations

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