I have a method which returns like this!
Mono<Integer> getNumberFromSomewhere();
I need to keep calling this until it has no more items to emit. That is I need to make this as Flux<Integer>
.
One option is to add repeat
. the point is - I want to stop when the above method emits the first empty signal.
Is there any way to do this? I am looking for a clean way.