private int getDrainIndex(String idString) {
        return nodesDrainIndex.computeIfAbsent(idString, s -> 0);
    }
Check whether there are any batches which haven't been drained
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java