Package org.apache.heron.spouts.kafka
Class DefaultKafkaConsumerFactory<K,V>
- java.lang.Object
-
- org.apache.heron.spouts.kafka.DefaultKafkaConsumerFactory<K,V>
-
- Type Parameters:
K- the type of the key of the Kafka recordV- 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 aMapas the properties to configure it.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultKafkaConsumerFactory(Map<String,Object> config)the config map, key strings should be fromConsumerConfig
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.kafka.clients.consumer.Consumer<K,V>create()create the underlying KafkaConsumer
-
-
-
Constructor Detail
-
DefaultKafkaConsumerFactory
public DefaultKafkaConsumerFactory(Map<String,Object> config)
the config map, key strings should be fromConsumerConfig- 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:KafkaConsumerFactorycreate the underlying KafkaConsumer- Specified by:
createin interfaceKafkaConsumerFactory<K,V>- Returns:
- kafka consumer instance
-
-