@Override
    public void accept(List<T> batch) {
        bufferedBatch.addAll(batch);
        if (bufferedBatch.size() >= minBatchSize) {
            flush();
        }
    }
A record batch consumer that merges incoming batches into batches of a minimum a given size. It does so
by buffering the records into an array that is later flushed to a downstream consumer. Batches consumed
by this class will not be broken apart, only combined with other batches to reach the minimum batch size.
</p>
Note that {@link #flush()} must be called after the last batch has been accepted in order to flush any
buffered records.
metadata/src/main/java/org/apache/kafka/metadata/migration/BufferingBatchConsumer.java