public class RocketMQStreamer<K,V> extends StreamAdapter<List<org.apache.rocketmq.common.message.MessageExt>,K,V> implements org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently
IgniteDataStreamer
instance.ignite
Constructor and Description |
---|
RocketMQStreamer() |
Modifier and Type | Method and Description |
---|---|
org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus |
consumeMessage(List<org.apache.rocketmq.common.message.MessageExt> msgs,
org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext context)
Implements
MessageListenerConcurrently.consumeMessage(List, ConsumeConcurrentlyContext) to receive
messages. |
void |
setConsumerGrp(String consumerGrp)
Sets the name of the consumer group.
|
void |
setNameSrvAddr(String nameSrvAddr)
Sets the name server address.
|
void |
setTopic(String topic)
Sets the topic to subscribe to.
|
void |
start()
Starts streamer.
|
void |
stop()
Stops streamer.
|
addMessage, getIgnite, getMultipleTupleExtractor, getSingleTupleExtractor, getStreamer, getTupleExtractor, setIgnite, setMultipleTupleExtractor, setSingleTupleExtractor, setStreamer, setTupleExtractor
public void start()
IgniteException
- If failed.public void stop()
public org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus consumeMessage(List<org.apache.rocketmq.common.message.MessageExt> msgs, org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext context)
MessageListenerConcurrently.consumeMessage(List, ConsumeConcurrentlyContext)
to receive
messages.
consumeMessage
in interface org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently
public void setTopic(String topic)
topic
- The topic to subscribe to.public void setConsumerGrp(String consumerGrp)
consumerGrp
- Consumer group name.public void setNameSrvAddr(String nameSrvAddr)
nameSrvAddr
- Name server address
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019