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


##########
connect/runtime/src/main/java/org/apache/kafka/connect/cli/ConnectDistributed.java:
##########
@@ -106,6 +108,7 @@ public Connect startConnect(Map<String, String> 
workerProps) {
         // Create the admin client to be shared by all backing stores.
         Map<String, Object> adminProps = new HashMap<>(config.originals());
         ConnectUtils.addMetricsContextProperties(adminProps, config, 
kafkaClusterId);
+        adminProps.putIfAbsent(CLIENT_ID_CONFIG, "connect-cluster-" + 
config.groupId());

Review Comment:
   Agreed with the behavior when users explicitly supply a client ID 👍
   
   I'd still like to give different client IDs to workers in the other case if 
possible. I gave base 64-encoding the advertised URL a shot and it doesn't seem 
too ugly.
   
   Now when a `client.id` is supplied in the worker config, the Kafka clients 
for, e.g., the config backing store will have the ID 
`<groupId>-<userSuppliedClientId>-configs`, and when one isn't supplied, the ID 
will be `<groupId>-<base64EncodedAdvertisedUrl>-configs`.
   
   How does that look?



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to