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 2022/08/09 04:02:19 UTC

[GitHub] [rocketmq-streams] jonahcui commented on issue #163: Remove sink/source besides RocketMQ

jonahcui commented on issue #163:
URL: https://github.com/apache/rocketmq-streams/issues/163#issuecomment-1208883884

   like `MQTT`,
   we need to remove the sink in data stream:
   ```
   public DataStream toMqtt(String url, String clientId, String topic) {
           PahoSink pahoSink = new PahoSink(url, clientId, topic);
           ChainStage<?> output = this.mainPipelineBuilder.createStage(pahoSink);
           this.mainPipelineBuilder.setTopologyStages(currentChainStage, output);
           return new DataStream(this.mainPipelineBuilder, this.otherPipelineBuilders, output);
       }
   
       public DataStream toMqtt(String url, String clientId, String topic, String username, String password) {
           PahoSink pahoSink = new PahoSink(url, clientId, topic, username, password);
           ChainStage<?> output = this.mainPipelineBuilder.createStage(pahoSink);
           this.mainPipelineBuilder.setTopologyStages(currentChainStage, output);
           return new DataStream(this.mainPipelineBuilder, this.otherPipelineBuilders, output);
       }
   ``` 
   and change the example code to MQTT Sink:
   ```
   .to(new PahoSink("tpc://localhost:1883", "test", "test"))
   ```
   
   ???


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