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


##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMaker.java:
##########
@@ -119,7 +126,16 @@ public class MirrorMaker {
     public MirrorMaker(MirrorMakerConfig config, List<String> clusters, Time 
time) {
         log.debug("Kafka MirrorMaker instance created");
         this.time = time;
-        this.advertisedBaseUrl = "NOTUSED";
+        if (config.enableInternalRest()) {
+            this.restClient = new RestClient(config);
+            internalServer = new MirrorRestServer(config.originals(), 
restClient);
+            internalServer.initializeServer();
+            this.advertisedUrl = internalServer.advertisedUrl().toString();
+        } else {
+            internalServer = null;
+            restClient = null;
+            this.advertisedUrl = "NOTUSED";

Review Comment:
   It ends up being used in the metadata workers send to the group coordinator 
during rebalances, and the schema we use to (de)serialize that data requires a 
non-null string for the worker URL. I stuck with the `"NOTUSED"` placeholder 
instead of an empty string since that's what we're using currently, and it 
doesn't seem worth the risk to try to change it now.



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