Class AbstractKafkaConsumerConfiguration<K,V>

java.lang.Object
io.micronaut.configuration.kafka.config.AbstractKafkaConfiguration<K,V>
io.micronaut.configuration.kafka.config.AbstractKafkaConsumerConfiguration<K,V>
Type Parameters:
K - The key deserializer type
V - The value deserializer type
All Implemented Interfaces:
io.micronaut.core.util.Toggleable
Direct Known Subclasses:
DefaultKafkaConsumerConfiguration, KafkaConsumerConfiguration

public abstract class AbstractKafkaConsumerConfiguration<K,V> extends AbstractKafkaConfiguration<K,V>
Abstract Configuration for Apache Kafka Consumer. See https://kafka.apache.org/documentation/#consumerconfigs
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • AbstractKafkaConsumerConfiguration

      protected AbstractKafkaConsumerConfiguration(Properties config)
      Constructs a new instance.
      Parameters:
      config - The config to use
  • Method Details

    • getKeyDeserializer

      public Optional<Deserializer<K>> getKeyDeserializer()
      Returns:
      The default key Deserializer
    • setKeyDeserializer

      public void setKeyDeserializer(@Nullable @Nullable Deserializer<K> keyDeserializer)
      Sets the key deserializer.
      Parameters:
      keyDeserializer - The key serializer
    • getValueDeserializer

      public Optional<Deserializer<V>> getValueDeserializer()
      Returns:
      The default value Deserializer
    • setValueDeserializer

      public void setValueDeserializer(@Nullable @Nullable Deserializer<V> valueDeserializer)
      Sets the default value deserializer.
      Parameters:
      valueDeserializer - The value deserializer