TakaHiR07 commented on code in PR #22750:
URL: https://github.com/apache/pulsar/pull/22750#discussion_r1607785324


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -453,6 +461,37 @@ public CompletableFuture<Void> closeAsync() {
             }
             state = State.Closing;
 
+            // forcefully delete heartbeat topic when close broker
+            if (this.brokerService != null) {
+                LOG.info("forcefully delete heartbeat topic when close 
broker");
+                NamespaceName namespaceNameV1 =
+                        
NamespaceService.getHeartbeatNamespace(getAdvertisedAddress(), 
getConfiguration());
+                NamespaceName namespaceNameV2 =
+                        
NamespaceService.getHeartbeatNamespaceV2(getAdvertisedAddress(), 
getConfiguration());
+                String heartbeatTopicNameV1 = 
String.format("persistent://%s/%s", namespaceNameV1, HEALTH_CHECK_TOPIC_SUFFIX);
+                String heartbeatTopicNameV2 = 
String.format("persistent://%s/%s", namespaceNameV2, HEALTH_CHECK_TOPIC_SUFFIX);

Review Comment:
   sounds good. have modified



-- 
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: commits-unsubscr...@pulsar.apache.org

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

Reply via email to