RongtongJin commented on code in PR #459:
URL: https://github.com/apache/rocketmq-connect/pull/459#discussion_r1159334270


##########
connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/ReplicatorSourceConnector.java:
##########
@@ -122,6 +135,25 @@ public int compare(MessageQueue o1, MessageQueue o2) {
         return result;
     }
 
+    private void execScheduleTask() {
+        requestTaskReconfigExecutorService.scheduleAtFixedRate(new Runnable() {
+            @Override
+            public void run() {
+                Map<String, String> topicTagMap = 
ReplicatorConnectorConfig.getSrcTopicTagMap(
+                        
connectorConfig.getString(ReplicatorConnectorConfig.SRC_INSTANCEID),
+                        
connectorConfig.getString(ReplicatorConnectorConfig.SRC_TOPICTAGS));
+                if (MapUtils.isEmpty(topicTagMap)) {
+                    throw new ConnectException("sink connector topics config 
cannot be null, please check sink connector config info");
+                }

Review Comment:
   If an exception is thrown, the task will be interrupted and there will be no 
log output.



##########
connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/ReplicatorSourceConnector.java:
##########
@@ -54,6 +59,14 @@ public class ReplicatorSourceConnector extends 
SourceConnector {
     private Log log = LogFactory.getLog(ReplicatorSourceConnector.class);
     private KeyValue connectorConfig;
     private DefaultMQAdminExt srcMQAdminExt;
+    private List<MessageQueue> curMessageQueues = new LinkedList<>();
+    private final long period = 30 * 1000;

Review Comment:
   Do you need to make it configurable?



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