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
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final booleanThe default restricted value.static final StringThe default prefix used for Kafka Health configuration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanBy default, the health check requires cluster-wide permissions in order to get information about the nodes in the Kafka cluster.voidsetEnabled(boolean enabled) Whether the Kafka health check is enabled.voidsetRestricted(boolean restricted) By default, the health check requires cluster-wide permissions in order to get information about the nodes in the Kafka cluster.
-
Field Details
-
PREFIX
The default prefix used for Kafka Health configuration.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_RESTRICTED
public static final boolean DEFAULT_RESTRICTEDThe default restricted value.- See Also:
-
-
Constructor Details
-
KafkaHealthConfigurationProperties
public KafkaHealthConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.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:KafkaHealthConfigurationBy 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:
isRestrictedin interfaceKafkaHealthConfiguration- 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.
-