private static <K, V> void completeUnrealizedFutures(
            Stream<Map.Entry<K, KafkaFutureImpl<V>>> futures,
            Function<K, String> messageFormatter) {
        futures.filter(entry -> !entry.getValue().isDone()).forEach(entry ->
                entry.getValue().completeExceptionally(new ApiException(messageFormatter.apply(entry.getKey()))));
    }
Fail futures in the given stream which are not done.
Used when a response handler expected a result for some entity but no result was present.
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java