public class KafkaStreamer<K,V> extends StreamAdapter<kafka.message.MessageAndMetadata<byte[],byte[]>,K,V>
IgniteDataStreamer
instance.
Uses Kafka's High Level Consumer API to read messages from Kafka.
Constructor and Description |
---|
KafkaStreamer() |
Modifier and Type | Method and Description |
---|---|
void |
setConsumerConfig(kafka.consumer.ConsumerConfig consumerCfg)
Sets the consumer config.
|
void |
setRetryTimeout(long retryTimeout)
Sets the retry timeout.
|
void |
setThreads(int threads)
Sets the threads.
|
void |
setTopic(String topic)
Sets the topic name.
|
void |
start()
Starts streamer.
|
void |
stop()
Stops streamer.
|
addMessage, getIgnite, getMultipleTupleExtractor, getSingleTupleExtractor, getStreamer, getTupleExtractor, setIgnite, setMultipleTupleExtractor, setSingleTupleExtractor, setStreamer, setTupleExtractor
public void setTopic(String topic)
topic
- Topic name.public void setThreads(int threads)
threads
- Number of threads.public void setConsumerConfig(kafka.consumer.ConsumerConfig consumerCfg)
consumerCfg
- Consumer configuration.public void setRetryTimeout(long retryTimeout)
retryTimeout
- Retry timeout.public void start()
IgniteException
- If failed.public void stop()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017