Class KafkaHealthConfigurationProperties

java.lang.Object
io.micronaut.configuration.kafka.config.KafkaHealthConfigurationProperties
All Implemented Interfaces:
KafkaHealthConfiguration, io.micronaut.core.util.Toggleable

@ConfigurationProperties("kafka.health") public class KafkaHealthConfigurationProperties extends Object implements KafkaHealthConfiguration
ConfigurationProperties implementation of KafkaHealthConfiguration.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    The default enable value.
    static final boolean
    The default restricted value.
    static final String
    The default prefix used for Kafka Health configuration.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
    By default, the health check requires cluster-wide permissions in order to get information about the nodes in the Kafka cluster.
    void
    setEnabled(boolean enabled)
    Whether the Kafka health check is enabled.
    void
    setRestricted(boolean restricted)
    By default, the health check requires cluster-wide permissions in order to get information about the nodes in the Kafka cluster.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PREFIX

      public static final String PREFIX
      The default prefix used for Kafka Health configuration.
      See Also:
    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • DEFAULT_RESTRICTED

      public static final boolean DEFAULT_RESTRICTED
      The default restricted value.
      See Also:
  • Constructor Details

    • KafkaHealthConfigurationProperties

      public KafkaHealthConfigurationProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Whether the Kafka health check is enabled. Default value true.
      Parameters:
      enabled - Whether the Kafka health check is enabled.
    • isRestricted

      public boolean isRestricted()
      Description copied from interface: KafkaHealthConfiguration
      By default, the health check requires cluster-wide permissions in order to get information about the nodes in the Kafka cluster. If your application doesn't have admin privileges (for example, this might happen in multi-tenant scenarios), you can switch to a "restricted" version of the health check which only validates basic connectivity but doesn't require any additional permissions.
      Specified by:
      isRestricted in interface KafkaHealthConfiguration
      Returns:
      Whether to switch to a "restricted" version of the health check.
    • setRestricted

      public void setRestricted(boolean restricted)
      By default, the health check requires cluster-wide permissions in order to get information about the nodes in the Kafka cluster. If your application doesn't have admin privileges (for example, this might happen in multi-tenant scenarios), you can switch to a "restricted" version of the health check which only validates basic connectivity but doesn't require any additional permissions.. Default value false
      Parameters:
      restricted - Whether to switch to a "restricted" version of the health check.