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
Constructors Constructor Description KafkaBinderHealthIndicator(KafkaMessageChannelBinder binder, org.springframework.kafka.core.ConsumerFactory<?,?> consumerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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.
-
-
-
Constructor Detail
-
KafkaBinderHealthIndicator
public KafkaBinderHealthIndicator(KafkaMessageChannelBinder binder, org.springframework.kafka.core.ConsumerFactory<?,?> consumerFactory)
-
-
Method Detail
-
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
-
-