Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Could not emit tick XXX due to lack of requests" mean?

I have a simple code that executes some task periodically using:

Flux.interval(Duration.ZERO, interval, scheduler)

Sometimes (rarely) I see the following error being issued:

Could not emit tick 4218 due to lack of requests (interval doesn't support small downstream requests that replenish slower than the ticks)

Looking at the source code I'm not able to understand what does it mean. Can someone explain? Also it would be great if someone could help me with a code snippet that reproduces this issue.

Thanks

like image 750
andrew.z Avatar asked Oct 19 '25 20:10

andrew.z


1 Answers

It essentially means that some code in the chain is too slow to process the emitted element(s) in time. Take this stream for example:

Flux.interval(Duration.ofSeconds(1)) //emit every second
  .map(i -> { 
         //do something that takes 2 seconds
       })
  .subscribe();

Every second a new value is pushed to the stream. That is Reactor tries to do that, but the stream is still busy processing the previous value (which takes more than one second). Please note that this example is for illustration only and it may or may not reproduce your problem.

like image 90
a better oliver Avatar answered Oct 22 '25 06:10

a better oliver



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!