Class DefaultKafkaConsumerFactory<K,​V>

  • Type Parameters:
    K - the type of the key of the Kafka record
    V - the type of the value of the Kafka record
    All Implemented Interfaces:
    Serializable, KafkaConsumerFactory<K,​V>

    public class DefaultKafkaConsumerFactory<K,​V>
    extends Object
    implements KafkaConsumerFactory<K,​V>
    a simple Kafka Consumer factory that builds a KafkaConsumer instance from a Map as the properties to configure it.
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultKafkaConsumerFactory

        public DefaultKafkaConsumerFactory​(Map<String,​Object> config)
        the config map, key strings should be from ConsumerConfig
        Parameters:
        config - the configuration map
        See Also:
        Kafka Consumer Configs
    • Method Detail

      • create

        public org.apache.kafka.clients.consumer.Consumer<K,​V> create()
        Description copied from interface: KafkaConsumerFactory
        create the underlying KafkaConsumer
        Specified by:
        create in interface KafkaConsumerFactory<K,​V>
        Returns:
        kafka consumer instance