ReactiveQuerydslPredicateExecutor Pagination for Reactive WebFlux

Viewed 727

I'm trying out the new ReactiveQuerydslPredicateExecutor in my project but i can't find a method for findAll(Predicate, Pageable) like i had in QueryDslPredicateExecutor

Is this intentional? Does it mean for reactive it's not recommended to use Pagination ?

1 Answers

in a reactive world, there is no use of something pageable because by default entities will be emitted as soon as they are available.

Think of it as a stream of data that just flows as soon as new data is available. If you wish to control the flow of data there are a number of methods that will tweek the flow. These are things like prefetch that will get n number before emitting them.

Or limitRate(N) splits the downstream requests so that they are propagated upstream in smaller batches.

you can read more about how to control the flow of data here: Operators changing the demand from downstream

Related