public void addToInflightBatches(Map<Integer, List<ProducerBatch>> batches) {
        for (List<ProducerBatch> batchList : batches.values()) {
            addToInflightBatches(batchList);
        }
    }
Get the in-flight batches that has reached delivery timeout.
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java