Skip to content

Commit

Permalink
Adding docs for ReactorKafkaBinderHealthIndicator
Browse files Browse the repository at this point in the history
See #2948
  • Loading branch information
sobychacko committed May 13, 2024
1 parent a89331c commit 7e20c9e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
**** xref:kafka/kafka-reactive-binder/multiplex.adoc[]
**** xref:kafka/kafka-reactive-binder/pattern.adoc[]
**** xref:kafka/kafka-reactive-binder/sender_result.adoc[]
**** xref:kafka/kafka-reactive-binder/health_indicator.adoc[]
*** Kafka Stream Binder
**** xref:kafka/kafka-streams-binder/usage.adoc[]
**** xref:kafka/kafka-streams-binder/overview.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[reactor-kafka-binder-health-indicator]]
= Reactor Kafka Binder Health Indicator

Reactor Kafka binder provides a `HealthIndicator` implementation that will be used when invoking the Spring Boot Actuator `health` endpoint.
When Spring Boot actuator dependency is on the classpath, the Reactor Kafka binder can be enabled with a binder health indicator.
This health indicator provides information about the status of the binder based application, i.e. if it is currently `UP` or `DOWN`, the topics in usage by the application, and the various details about the message producer components that the binder uses internally.


The Reactor Kafka Binder Health Indicator is registered with the key `reactorKafka` internally by the framework.
Therefore, it can be queried programmatically as shown below.

[source, java]
----
CompositeHealthContributor compositeHealthContributor = context
.getBean("bindersHealthContributor", CompositeHealthContributor.class);
ReactorKafkaBinderHealthIndicator healthIndicator = (ReactorKafkaBinderHealthIndicator) compositeHealthContributor.getContributor("reactorKafka");
Health health = healthIndicator.health();
----

0 comments on commit 7e20c9e

Please sign in to comment.