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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to