Oliverwqcwrw commented on code in PR #313:
URL: https://github.com/apache/rocketmq-connect/pull/313#discussion_r979233681


##########
connectors/rocketmq-connect-mongo/src/main/java/org/apache/connect/mongo/connector/MongoSourceConnector.java:
##########
@@ -32,45 +32,32 @@ public class MongoSourceConnector extends SourceConnector {
     private KeyValue keyValueConfig;
 
     @Override
-    public String verifyAndSetConfig(KeyValue config) {
+    public void start(KeyValue config) {
         for (String requestKey : SourceTaskConfig.REQUEST_CONFIG) {
             if (!config.containsKey(requestKey)) {
-                return "Request config key: " + requestKey;
+                throw new RuntimeException("Request config key: " + 
requestKey);
             }
         }
         this.keyValueConfig = config;
-        return "";
-    }
-
-    @Override
-    public void start() {
-        logger.info("start mongo source connector:{}", keyValueConfig);
     }
 
     @Override
     public void stop() {
-
+        this.keyValueConfig = null;
     }
 
-    @Override
-    public void pause() {
 
-    }
-
-    @Override
-    public void resume() {
 
+    @Override public List<KeyValue> taskConfigs(int maxTasks) {

Review Comment:
   done
   <img width="1050" alt="image" 
src="https://user-images.githubusercontent.com/31796988/192096902-1678e2f1-9c2d-48a7-bcda-a02766ea6453.png";>
   



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