Class KafkaDefaultConfiguration
java.lang.Object
io.micronaut.configuration.kafka.config.AbstractKafkaConfiguration
io.micronaut.configuration.kafka.config.KafkaDefaultConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
@ConfigurationProperties("kafka")
@Requires(property="kafka") @Requires(property="kafka.enabled",notEquals="false")
public class KafkaDefaultConfiguration
extends AbstractKafkaConfiguration
The default Kafka configuration to apply to both the consumer and the producer, but can be overridden by either.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default health timeout value.Fields inherited from class io.micronaut.configuration.kafka.config.AbstractKafkaConfiguration
DEFAULT_BOOTSTRAP_SERVERS, DEFAULT_KAFKA_PORT, EMBEDDED_TOPICS, PREFIX, TOPICS
-
Constructor Summary
ConstructorDescriptionKafkaDefaultConfiguration
(io.micronaut.context.env.Environment environment) Constructs the default Kafka configuration. -
Method Summary
Modifier and TypeMethodDescriptionThe health check timeout.void
setHealthTimeout
(Duration healthTimeout) The health check timeout.Methods inherited from class io.micronaut.configuration.kafka.config.AbstractKafkaConfiguration
getConfig, toKafkaProperties
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.util.Toggleable
isEnabled
-
Field Details
-
DEFAULT_HEALTHTIMEOUT
public static final int DEFAULT_HEALTHTIMEOUTThe default health timeout value.- See Also:
-
-
Constructor Details
-
KafkaDefaultConfiguration
public KafkaDefaultConfiguration(io.micronaut.context.env.Environment environment) Constructs the default Kafka configuration.- Parameters:
environment
- The environment
-
-
Method Details
-
getHealthTimeout
The health check timeout.- Returns:
- The duration
-
setHealthTimeout
The health check timeout. Default value (10 seconds).- Parameters:
healthTimeout
- The duration
-