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/03/25 06:21:17 UTC

[GitHub] [rocketmq-connect] sunxi92 commented on issue #25: FileSourceConnector cannot send data to a topic specified in RocketMQ

sunxi92 commented on issue #25:
URL: https://github.com/apache/rocketmq-connect/issues/25#issuecomment-1078695879


   > Can you describe in detail how it happened? Configuration of FileSourceConnector, using branch of rocketmq-connect ?
   I follow the following steps to operate:
   (1)Start a RocketMQ cluster and create  the topic  fileTopic
   (2)Build the project
   (3)Update the connect.conf, include storePathRootDir、pluginPaths
   ![image](https://user-images.githubusercontent.com/25401190/160065252-618d0238-2806-44b9-b0b4-9aec6344a74f.png)
   (4)Copy rocketmq-connect-sample-0.0.1-SNAPSHOT.jar to pluginPaths
   (5)Prepare  the  source data
   (6)Run run_worker.sh 
   (7)Start the source connector:
   http://127.0.0.1:8082/connectors/fileConnectorSource?config={
   "connector-class":"org.apache.rocketmq.connect.file.FileSourceConnector",
   "topic":"fileTopic",
   "filename":"/Users/sunxi/Documents/application/rocketmq-connect/source-file/source-file.txt",
   "source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"
   }   
   The console information is as follows:
   INFO qtp624271064-23 - config: {"connector-class":"org.apache.rocketmq.connect.file.FileSourceConnector","topic":"fileTopic","filename":"/Users/sunxi/Documents/application/rocketmq-connect/source-file/source-file.txt","source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"}
   (8)Start the sink connector:
     http://127.0.0.1:8082/connectors/fileConnectorSink?config={
       "connector-class":"org.apache.rocketmq.connect.file.FileSinkConnector",
       "topicNames":"fileTopic",
       "filename":"/Users/sunxi/Documents/application/rocketmq-connect/source-file/sink-file.txt",
       "source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"
    }
   The console information is as follows:
   INFO qtp624271064-20 - config: {"connector-class":"org.apache.rocketmq.connect.file.FileSinkConnector","topicNames":"fileTopic","filename":"/Users/sunxi/Documents/application/rocketmq-connect/source-file/sink-file.txt","source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"}
   
   The results are as follow:
   (1)The topic fileTopic has no data
   (2)Since there is no data in topic fileTopic, the data is not transferred to the specified file
   
   


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