lizhiboo opened a new issue #47:
URL: https://github.com/apache/rocketmq-streams/issues/47


   AFAIK, FilterFunction return true indicate this message will be conducted in 
flink.
   ```java
       public <O> DataStream filter(final FilterFunction<O> filterFunction) {
           StageBuilder mapUDFOperator = new StageBuilder() {
   
               @Override
               protected <T> T operate(IMessage message, AbstractContext 
context) {
                   try {
                       boolean isFilter = 
filterFunction.filter((O)message.getMessageValue());
                       if (isFilter) {
                           context.breakExecute();
                       }
                   } catch (Exception e) {
                       e.printStackTrace();
                   }
                   return null;
               }
           };
           ChainStage stage = 
this.mainPipelineBuilder.createStage(mapUDFOperator);
           this.mainPipelineBuilder.setTopologyStages(currentChainStage, stage);
           return new DataStream(this.mainPipelineBuilder, 
this.otherPipelineBuilders, stage);
       }
   ```


-- 
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