Una corriente de lotes Java-8,
Iterators.partition(stream.iterator(), batchSize).forEachRemaining(this::process);
KP
Iterators.partition(stream.iterator(), batchSize).forEachRemaining(this::process);