EronWright commented on a change in pull request #12066:
URL: https://github.com/apache/pulsar/pull/12066#discussion_r712413394



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
##########
@@ -294,9 +295,10 @@ protected String internalGetNamespaceBundle(TopicName 
topicName) {
                                                 newAuthoritative, 
LookupType.Redirect, requestId, false));
                             } else {
                                 // When running in standalone mode we want to 
redirect the client through the service
-                                // url, so that the advertised address 
configuration is not relevant anymore.
-                                boolean redirectThroughServiceUrl = 
pulsarService.getConfiguration()
-                                        .isRunningStandalone();
+                                // url, if the advertised address is localhost 
(per PulsarStandaloneStarter).
+                                ServiceConfiguration conf = 
pulsarService.getConfiguration();
+                                boolean isLocalhost = 
StringUtils.equals("localhost", conf.getAdvertisedAddress());

Review comment:
       I updated the code to use `isLoopbackAddress` against the resolved 
`LookupData`.  The logic can be understood as "don't return a LookupData that 
is pointing to a loopback address; force a proxy mode in that case". 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to