lizhiboo commented on code in PR #151:
URL: https://github.com/apache/rocketmq-connect/pull/151#discussion_r899796813


##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/config/SinkConnectorConfig.java:
##########
@@ -19,25 +19,30 @@
 package org.apache.rocketmq.connect.runtime.config;
 
 import com.google.common.base.Splitter;
-import java.util.HashSet;
+import java.util.HashMap;
 import java.util.List;
-import java.util.Set;
+import java.util.Map;
 import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.rocketmq.common.message.MessageQueue;
 import org.apache.rocketmq.connect.runtime.common.ConnectKeyValue;
 
 public class SinkConnectorConfig extends ConnectConfig {
 
 
 
-    public static Set<String> parseTopicList(ConnectKeyValue taskConfig) {
-        String messageQueueStr = 
taskConfig.getString(RuntimeConfigDefine.CONNECT_TOPICNAME);
-        if (StringUtils.isBlank(messageQueueStr)) {
-            return null;
+    public static Map<String, String> parseTopicList(ConnectKeyValue 
taskConfig) {
+        String topicNameAndTagss = 
taskConfig.getString(RuntimeConfigDefine.CONNECT_TOPICNAME);
+        List<String> topicTagList = 
Splitter.on(COMMA).omitEmptyStrings().trimResults().splitToList(topicNameAndTagss);
+        Map<String, String> topicNameAndTagssMap = new HashMap<>(8);
+        for (String topicTagPair : topicTagList) {
+            List<String> topicAndTag = 
Splitter.on(SEMICOLON).omitEmptyStrings().trimResults().splitToList(topicTagPair);

Review Comment:
   IMO, exchange COMMA and SEMICOLON to maintain upgrade compatible.



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