@Override
    public boolean hasInFlightRequests() {
        return !this.inFlightRequests.isEmpty();
    }
Get the number of in-flight requests
clients/src/main/java/org/apache/kafka/clients/NetworkClient.java