'What will project reactor do in this scenario?
In a very low transaction volume environment, such as some of our test environments, what will the project reactor classes do if the subscriber requests N new items to work on, but the publisher currently has less than N new items to send. Will the publisher (1) send less than N new items immediately, (2) wait until it has N new items to send, or (3) wait until a configurable timeout before it sends less than N new items? I'm trying to troubleshoot a problem, in one of these very low volume environments, which leads me to believe that something is stuck on the publisher side, even though the subscriber should be regularly requesting batches of work.
Solution 1:[1]
If the publisher can partially answer the request, it must send these x < N items. It must also remember that the remaining demand is currently at y = N-x, and send these elements as they become available even if the subscriber has made no further request.
If the publisher knows that it won't be able to fulfill the full demand, because it works with a limited dataset, then it must complete the sequence early with an onComplete after having emitted what it can.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Simon Baslé |
