You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/10/18 09:06:05 UTC

[GitHub] [rocketmq-flink] mispower opened a new issue #11: The example of DataSream connector api should change RocketMQSource to RocketMQSourceFunction in the document.

mispower opened a new issue #11:
URL: https://github.com/apache/rocketmq-flink/issues/11


    env.addSource(new _**RocketMQSource**_(new SimpleKeyValueDeserializationSchema("id", "address"), consumerProps))
               .name("rocketmq-source")
               .setParallelism(2)
               .process(new ProcessFunction<Map, Map>() {
                   @Override
                   public void processElement(Map in, Context ctx, Collector<Map> out) throws Exception {
                       HashMap result = new HashMap();
                       result.put("id", in.get("id"));
                       String[] arr = in.get("address").toString().split("\\s+");
                       result.put("province", arr[arr.length-1]);
                       out.collect(result);
                   }
               })
               .name("upper-processor")
               .setParallelism(2)
               .addSink(new RocketMQSink(new SimpleKeyValueSerializationSchema("id", "province"),
                   new DefaultTopicSelector("flink-sink2"), producerProps).withBatchFlushOnCheckpoint(true))
               .name("rocketmq-sink")
               .setParallelism(2);


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-flink] SteNicholas commented on issue #11: The example of DataSream connector api should change RocketMQSource to RocketMQSourceFunction in the document.

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on issue #11:
URL: https://github.com/apache/rocketmq-flink/issues/11#issuecomment-963103980


   @mispower , it's recommended to use the `RocketMQSource` for the new Source interace of Flink. Which RocketMQ source are you using?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-flink] mispower closed issue #11: The example of DataSream connector api should change RocketMQSource to RocketMQSourceFunction in the document.

Posted by GitBox <gi...@apache.org>.
mispower closed issue #11:
URL: https://github.com/apache/rocketmq-flink/issues/11


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-flink] vongosling closed issue #11: The example of DataSream connector api should change RocketMQSource to RocketMQSourceFunction in the document.

Posted by GitBox <gi...@apache.org>.
vongosling closed issue #11:
URL: https://github.com/apache/rocketmq-flink/issues/11


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org