Class KafkaStreamsHealth

  • All Implemented Interfaces:
    io.micronaut.core.order.Ordered, io.micronaut.management.health.indicator.HealthIndicator

    @Singleton
    @Requires(classes=io.micronaut.management.health.indicator.HealthIndicator.class) @Requires(property="kafka.health.streams.enabled",value="true",defaultValue="true")
    public class KafkaStreamsHealth
    extends java.lang.Object
    implements io.micronaut.management.health.indicator.HealthIndicator
    A HealthIndicator for Kafka Streams.
    Since:
    2.0.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ENABLED_PROPERTY  
      • Fields inherited from interface io.micronaut.core.order.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Constructor Summary

      Constructors 
      Constructor Description
      KafkaStreamsHealth​(KafkaStreamsFactory kafkaStreamsFactory, io.micronaut.management.health.aggregator.HealthAggregator<?> healthAggregator)
      Constructor for the health check.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<io.micronaut.management.health.indicator.HealthResult> getResult()
      Get the health result of the streams.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.micronaut.core.order.Ordered

        getOrder
    • Field Detail

      • ENABLED_PROPERTY

        public static final java.lang.String ENABLED_PROPERTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • KafkaStreamsHealth

        public KafkaStreamsHealth​(KafkaStreamsFactory kafkaStreamsFactory,
                                  io.micronaut.management.health.aggregator.HealthAggregator<?> healthAggregator)
        Constructor for the health check.
        Parameters:
        kafkaStreamsFactory - The stream factory to get streams from
        healthAggregator - Health aggregator
    • Method Detail

      • getResult

        public org.reactivestreams.Publisher<io.micronaut.management.health.indicator.HealthResult> getResult()
        Get the health result of the streams. Will attempt to interrogate details of each stream as well. The application.id will be used for each configured stream as the primary health check name.
        Specified by:
        getResult in interface io.micronaut.management.health.indicator.HealthIndicator
        Returns:
        Health Result Aggregate