aahmed-se commented on a change in pull request #10962: URL: https://github.com/apache/pulsar/pull/10962#discussion_r655801162
########## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java ########## @@ -142,6 +142,7 @@ public static final Pattern HEARTBEAT_NAMESPACE_PATTERN = Pattern.compile("pulsar/[^/]+/([^:]+:\\d+)"); public static final Pattern SLA_NAMESPACE_PATTERN = Pattern.compile(SLA_NAMESPACE_PROPERTY + "/[^/]+/([^:]+:\\d+)"); public static final String HEARTBEAT_NAMESPACE_FMT = "pulsar/%s/%s:%s"; + public static final String HEARTBEAT_NAMESPACE_FMT_V2 = "pulsar/%s:%s"; Review comment: We already have a new version of the method that does that. ``` public static String getHeartbeatNamespaceV2(String host, ServiceConfiguration config) { Integer port = null; if (config.getWebServicePort().isPresent()) { port = config.getWebServicePort().get(); } else if (config.getWebServicePortTls().isPresent()) { port = config.getWebServicePortTls().get(); } return String.format(HEARTBEAT_NAMESPACE_FMT_V2, host, port); } ``` -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org