private static long findMinTime(final Collection<? extends RequestState> requests, final long currentTimeMs) {
        return requests.stream()
            .mapToLong(request -> request.remainingBackoffMs(currentTimeMs))
            .min()
            .orElse(Long.MAX_VALUE);
    }
Returns the delay for which the application thread can safely wait before it should be responsive
to results from the request managers. For example, the subscription state can change when heartbeats
are sent, so blocking for longer than the heartbeat interval might mean the application thread is not
responsive to changes.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java