Class AbstractKafkaProducerConfiguration<K,V>
java.lang.Object
io.micronaut.configuration.kafka.config.AbstractKafkaConfiguration<K,V>
io.micronaut.configuration.kafka.config.AbstractKafkaProducerConfiguration<K,V>
- Type Parameters:
K- The key deserializer typeV- The value deserializer type
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Direct Known Subclasses:
DefaultKafkaProducerConfiguration, KafkaProducerConfiguration
public abstract class AbstractKafkaProducerConfiguration<K,V>
extends AbstractKafkaConfiguration<K,V>
Abstract Configuration for Apache Kafka Producer. See https://kafka.apache.org/documentation.html#producerconfigs
- Since:
- 1.0
- Author:
- Iván López, Graeme Rocher
-
Field Summary
Fields inherited from class AbstractKafkaConfiguration
DEFAULT_BOOTSTRAP_SERVERS, DEFAULT_KAFKA_PORT, EMBEDDED_TOPICS, PREFIX, TOPICS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetExecutor(String executor) Sets the default executor to use to enable non-blocking producers.voidsetKeySerializer(@Nullable Serializer<K> keySerializer) Sets the key serializer.voidsetValueSerializer(@Nullable Serializer<V> valueSerializer) Sets the default value serializer.Methods inherited from class AbstractKafkaConfiguration
getConfig, toKafkaPropertiesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.util.Toggleable
isEnabled
-
Constructor Details
-
AbstractKafkaProducerConfiguration
Constructs a new instance.- Parameters:
config- The config to use
-
-
Method Details
-
getKeySerializer
- Returns:
- The default key
Serializer
-
setKeySerializer
Sets the key serializer.- Parameters:
keySerializer- The key serializer
-
getValueSerializer
- Returns:
- The default value
Serializer
-
setValueSerializer
Sets the default value serializer.- Parameters:
valueSerializer- The value serializer
-
getExecutor
-
setExecutor
Sets the default executor to use to enable non-blocking producers.- Parameters:
executor- The executor name
-