public class KafkaStreamer<K,V> extends StreamAdapter<org.apache.kafka.clients.consumer.ConsumerRecord,K,V>
IgniteDataStreamer
instance.
Uses Kafka's High Level Consumer API to read messages from Kafka.
ignite
Constructor and Description |
---|
KafkaStreamer() |
Modifier and Type | Method and Description |
---|---|
void |
setConsumerConfig(Properties consumerCfg)
Sets the consumer config.
|
void |
setThreads(int threads)
Sets the threads.
|
void |
setTimeout(long timeout)
Sets the polling timeout for Kafka tasks.
|
void |
setTopic(List<String> topics)
Sets the topic names.
|
void |
start()
Starts streamer.
|
void |
stop()
Stops streamer.
|
addMessage, getIgnite, getMultipleTupleExtractor, getSingleTupleExtractor, getStreamer, getTupleExtractor, setIgnite, setMultipleTupleExtractor, setSingleTupleExtractor, setStreamer, setTupleExtractor
public void setTopic(List<String> topics)
topics
- Topic names.public void setThreads(int threads)
threads
- Number of threads.public void setConsumerConfig(Properties consumerCfg)
consumerCfg
- Consumer configuration.public void setTimeout(long timeout)
timeout
- Timeout.public void start()
IgniteException
- If failed.public void stop()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019