Class KafkaBinderHealthIndicator
java.lang.Object
org.springframework.cloud.stream.binder.kafka.KafkaBinderHealthIndicator
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.boot.actuate.health.HealthContributor
,org.springframework.boot.actuate.health.HealthIndicator
,KafkaBinderHealth
public class KafkaBinderHealthIndicator
extends Object
implements KafkaBinderHealth, org.springframework.beans.factory.DisposableBean
Health indicator for Kafka.
- Author:
- Ilayaperumal Gopinathan, Marius Bogoevici, Henryk Konsek, Gary Russell, Laur Aliste, Soby Chacko, Vladislav Fefelov, Chukwubuikem Ume-Ugwa, Taras Danylchuk
-
Constructor Summary
ConstructorDescriptionKafkaBinderHealthIndicator
(KafkaMessageChannelBinder binder, org.springframework.kafka.core.ConsumerFactory<?, ?> consumerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
org.springframework.boot.actuate.health.Health
health()
void
setConsiderDownWhenAnyPartitionHasNoLeader
(boolean considerDownWhenAnyPartitionHasNoLeader) void
setTimeout
(int timeout) Set the timeout in seconds to retrieve health information.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Constructor Details
-
KafkaBinderHealthIndicator
public KafkaBinderHealthIndicator(KafkaMessageChannelBinder binder, org.springframework.kafka.core.ConsumerFactory<?, ?> consumerFactory)
-
-
Method Details
-
setTimeout
public void setTimeout(int timeout) Set the timeout in seconds to retrieve health information.- Parameters:
timeout
- the timeout - default 60.
-
setConsiderDownWhenAnyPartitionHasNoLeader
public void setConsiderDownWhenAnyPartitionHasNoLeader(boolean considerDownWhenAnyPartitionHasNoLeader) -
health
public org.springframework.boot.actuate.health.Health health()- Specified by:
health
in interfaceorg.springframework.boot.actuate.health.HealthIndicator
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-