Addressing Rabbit Binder Health Indicator Issues

Currently, using the property management.health.binders.enabled,
we cannot disable the Rabbit health indicator. Addressing this issue.

Adding docs.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/341
This commit is contained in:
Soby Chacko
2021-09-09 12:14:07 -04:00
committed by Oleg Zhurakousky
parent 14b37fd059
commit b21e4020a3
2 changed files with 23 additions and 1 deletions

View File

@@ -1245,3 +1245,22 @@ ProducerMessageHandlerCustomizer<MessageHandler> handlerCustomizer() {
====
Refer to the https://rabbitmq.github.io/rabbitmq-stream-java-client/stable/htmlsingle/[RabbitMQ Stream Java Client documentation] for information about configuring the environment and producer builder.
=======
[[rabbit-binder-health-indicator]]
== Rabbit Binder Health Indicator
The health indicator for Rabbit binder delegates to the one provided from Spring Boot.
For more information on this, see https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator.endpoints.health.auto-configured-health-indicators[this].
You can disable this health indicator at the binder level by using the property - `management.health.binders.enabled` and set this to `false`.
In the case of multibinder environements, this has to be set on the binder's environment properties.
When the health indicator is disabled, you should see something like the below in the health actuator endpoint:
```
"rabbit": {
"status": "UNKNOWN"
}
```
At the Spring Boot level, if you want to disable the Rabbit health indicator, you need to use the property `management.health.rabbit.enabled` and set to `false`.