public int count() {
        return inFlightRequestCount.get();
    }
Count all in-flight requests for all nodes. This method is thread safe, but may lag the actual count.
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java