Skip to content

Commit

Permalink
Document how to register a blocking health contributor with reactive
Browse files Browse the repository at this point in the history
Closes gh-19707
  • Loading branch information
snicoll committed Feb 11, 2020
1 parent 06e5b0e commit b0aba9e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -794,7 +794,8 @@ For reactive applications, such as those using Spring WebFlux, `ReactiveHealthIn
Similar to a traditional `HealthIndicator`, health information is collected from the content of a {spring-boot-actuator-module-code}/health/ReactiveHealthIndicatorRegistry.java[`ReactiveHealthIndicatorRegistry`] (by default all {spring-boot-actuator-module-code}/health/HealthIndicator.java[`HealthIndicator`] and {spring-boot-actuator-module-code}/health/ReactiveHealthIndicator.java[`ReactiveHealthIndicator`] instances defined in your `ApplicationContext`.
Regular `HealthIndicator` that do not check against a reactive API are executed on the elastic scheduler.

TIP: In a reactive application, The `ReactiveHealthIndicatorRegistry` can be used to register and unregister health indicators at runtime.
TIP: In a reactive application, The `ReactiveHealthIndicatorRegistry` should be used to register and unregister health indicators at runtime.
If you need to register a regular `HealthIndicator`, you should wrap it using `HealthIndicatorReactiveAdapter`.

To provide custom health information from a reactive API, you can register Spring beans that implement the {spring-boot-actuator-module-code}/health/ReactiveHealthIndicator.java[`ReactiveHealthIndicator`] interface.
The following code shows a sample `ReactiveHealthIndicator` implementation:
Expand Down

0 comments on commit b0aba9e

Please sign in to comment.