diff --git a/core-java-9/src/main/java/com/baeldung/java9/reactive/BaeldungBatchSubscriberImpl.java b/core-java-9/src/main/java/com/baeldung/java9/reactive/BaeldungBatchSubscriberImpl.java index 4c65cb35b6..46eee4883a 100644 --- a/core-java-9/src/main/java/com/baeldung/java9/reactive/BaeldungBatchSubscriberImpl.java +++ b/core-java-9/src/main/java/com/baeldung/java9/reactive/BaeldungBatchSubscriberImpl.java @@ -43,11 +43,9 @@ public class BaeldungBatchSubscriberImpl implements Subscriber { // if buffer is full, process the items. if (buffer.size() >= BUFFER_SIZE) { processBuffer(); - subscription.request(BUFFER_SIZE); - } else if(buffer.size() == 0) { - // If buffer empty, request more items. - subscription.request(BUFFER_SIZE); } + //request more items. + subscription.request(1); } private void processBuffer() {