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/04/27 13:29:00 UTC

[GitHub] [rocketmq-connect] sunxi92 commented on a diff in pull request #52: [ISSUES #51] Automatically create clusterStoreTopic connector-cluster-topic.

sunxi92 commented on code in PR #52:
URL: https://github.com/apache/rocketmq-connect/pull/52#discussion_r859801890


##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/service/ClusterManagementServiceImpl.java:
##########
@@ -65,9 +66,20 @@ public ClusterManagementServiceImpl(ConnectConfig connectConfig) {
      * @param connectConfig
      */
     private void prepare(ConnectConfig connectConfig) {
-        if (connectConfig.isAutoCreateGroupEnable()) {
-            ConnectUtil.createSubGroup(connectConfig, this.defaultMQPullConsumer.getConsumerGroup());
+        String consumerGroup = this.defaultMQPullConsumer.getConsumerGroup();
+        Set<String> topicSet = ConnectUtil.fetchAllTopicList(connectConfig);

Review Comment:
   > Is it possible to just check whether a single topic exists?
   
   A ConnectController is created when the Runtime is started.When ConnectController created, the ClusterManagementServiceImpl, ConfigManagementServiceImpl, PositionManagementServiceImpl and OffsetMan AgementServiceImpl are created, in the process of creating the prepare method will check whether the corresponding topic exist if not then create it.



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