Skip to content

Use Reactor's new Schedulers.boundedElastic() #18269

@bclozel

Description

@bclozel

As of reactor/reactor-core#1804, Reactor core will provide a new Scheduler implementation, Schedulers.boundedElastic().

This implementation, unlike elastic does not create an unbounded number of threads; it creates a bounded number of workers and will queue tasks if there are no worker available. This implementation is a direct replacement for the elastic one, as it limits the amount of resources.

Spring Boot Actuator is currently using the elastic scheduler un various places (health indicators and the WebFlux EndpointHandlerMapping). We're doing so because we need to execute tasks that might be blocking and we need to ensure that we're not blocking a server thread while doing so.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions