private void abortBatches() {
        abortBatches(new KafkaException("Producer is closed forcefully."));
    }
Go through incomplete batches and abort them.
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java