Prev Next

Spring / Spring Webflux Interview questions

When should you use Schedulers.boundedElastic()?

You use it when you have to wrap a blocking I/O call (like a legacy JDBC driver or File I/O) inside a reactive pipeline. It provides a thread pool that grows as needed but is capped to prevent resource exhaustion.

Example: Mono.fromCallable(() -> blockingCall()).subscribeOn(Schedulers.boundedElastic())

More Related questions...

Show more question and Answers...


Comments & Discussions