You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/08/20 12:59:40 UTC

[GitHub] [kafka] C0urante commented on a diff in pull request #12536: KAFKA-14160: Streamline clusterId retrieval in Connect

C0urante commented on code in PR #12536:
URL: https://github.com/apache/kafka/pull/12536#discussion_r950692858


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConfig.java:
##########
@@ -409,6 +412,13 @@ public String groupId() {
         return null;
     }
 
+    public String kafkaClusterId() {
+        if (kafkaClusterId == null) {
+            kafkaClusterId = ConnectUtils.lookupKafkaClusterId(this);
+        }
+        return kafkaClusterId;
+    }

Review Comment:
   Should we move the `lookupKafkaClusterId` logic from `ConnectUtils` to this class, so that nobody accidentally starts using the variant that creates and discards an admin client once per call?



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org