Skip to content

Commit b0aba9e

Browse files
committed
Document how to register a blocking health contributor with reactive
Closes gh-19707
1 parent 06e5b0e commit b0aba9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ For reactive applications, such as those using Spring WebFlux, `ReactiveHealthIn
794794
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`.
795795
Regular `HealthIndicator` that do not check against a reactive API are executed on the elastic scheduler.
796796

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

799800
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.
800801
The following code shows a sample `ReactiveHealthIndicator` implementation:

0 commit comments

Comments
 (0)