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
Modifier and TypeFieldDescriptionstatic 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.
-
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:
isEnabled
in 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: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 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.
-