You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by zh...@apache.org on 2022/12/16 08:34:20 UTC

[rocketmq-connect] branch master updated: [ISSUE #394] fix: create topic should check not exist (#393)

This is an automated email from the ASF dual-hosted git repository.

zhoubo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-connect.git


The following commit(s) were added to refs/heads/master by this push:
     new 16f1d59f [ISSUE #394] fix: create topic should check not exist (#393)
16f1d59f is described below

commit 16f1d59fe07fbc814e8290ebb98256073d508f02
Author: Vincent Lee <co...@gmail.com>
AuthorDate: Fri Dec 16 16:34:15 2022 +0800

    [ISSUE #394] fix: create topic should check not exist (#393)
    
    Change-Id: I3b31de8f1708f213f9d6670a833551ee7f2d1108
    
    Co-authored-by: liwen.2022 <li...@bytedance.com>
---
 .../rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java b/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java
index e8a9f1a2..cfec5924 100644
--- a/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java
+++ b/rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java
@@ -431,7 +431,7 @@ public class WorkerSourceTask extends WorkerTask {
         if (StringUtils.isBlank(topic)) {
             throw new ConnectException("source connect lack of topic config");
         }
-        if (ConnectUtil.isTopicExist(workerConfig, topic)) {
+        if (!ConnectUtil.isTopicExist(workerConfig, topic)) {
             ConnectUtil.createTopic(workerConfig, new TopicConfig(topic));
         }
         return topic;