Class AbstractKafkaConfiguration<K,V>
java.lang.Object
io.micronaut.configuration.kafka.config.AbstractKafkaConfiguration<K,V>
- Type Parameters:
K
- The key deserializer typeV
- The value deserializer type
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Direct Known Subclasses:
AbstractKafkaConsumerConfiguration
,AbstractKafkaProducerConfiguration
,AbstractKafkaStreamsConfiguration
,KafkaDefaultConfiguration
public abstract class AbstractKafkaConfiguration<K,V>
extends Object
implements io.micronaut.core.util.Toggleable
An abstract Kafka configuration class.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default bootstrap server address.static final int
The default kafka port.static final String
The topics that should be created.static final String
The default prefix used for Kafka configuration.static final String
The topics that should be created. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractKafkaConfiguration
(Properties config) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescription@NonNull Properties
protected static Properties
toKafkaProperties
(io.micronaut.context.env.Environment environment, Map<?, ?> values) Convert the given map of values to kafka properties.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_KAFKA_PORT
public static final int DEFAULT_KAFKA_PORTThe default kafka port.- See Also:
-
PREFIX
The default prefix used for Kafka configuration.- See Also:
-
TOPICS
The topics that should be created.- See Also:
-
EMBEDDED_TOPICS
The topics that should be created.- See Also:
-
DEFAULT_BOOTSTRAP_SERVERS
The default bootstrap server address.- See Also:
-
-
Constructor Details
-
AbstractKafkaConfiguration
Constructs a new instance.- Parameters:
config
- The config to use
-
-
Method Details
-
toKafkaProperties
protected static Properties toKafkaProperties(io.micronaut.context.env.Environment environment, Map<?, ?> values) Convert the given map of values to kafka properties.- Parameters:
environment
- The envvalues
- The values- Returns:
- The kafka properties
-
getConfig
- Returns:
- The Kafka configuration
-