StyleTang commented on a change in pull request #57:
URL: https://github.com/apache/rocketmq-dashboard/pull/57#discussion_r778113789



##########
File path: 
src/main/java/org/apache/rocketmq/dashboard/service/impl/ConsumerServiceImpl.java
##########
@@ -303,6 +312,16 @@ public boolean deleteSubGroup(DeleteSubGroupRequest 
deleteSubGroupRequest) {
         return true;
     }
 
+    private void deleteResources(String topic, String brokerName, ClusterInfo 
clusterInfo) throws Exception {
+        
mqAdminExt.deleteTopicInBroker(Sets.newHashSet(clusterInfo.getBrokerAddrTable().get(brokerName).selectBrokerAddr()),
 topic);
+        Set<String> nameServerSet = null;
+        if (StringUtils.isNotBlank(configure.getNamesrvAddr())) {
+            String[] ns = configure.getNamesrvAddr().split(";");
+            nameServerSet = new HashSet<>(Arrays.asList(ns));
+        }
+        mqAdminExt.deleteTopicInNameServer(nameServerSet, topic);

Review comment:
       Just want to confirm whether there is a problem with the 
`deleteTopicInNameServer`
   
   A SubGroup can exist in multiple brokers.
   For example : 
   GROUP_1 
   |----- brokerA
   |------brokerB
   If we just want to delete GROUP_1 in brokerA, deleteTopicInNameServer will 
also be invoked. It will delete all the QueueData of this topic in namesvr, not 
sure whether it will cause issue or not.
   
![image](https://user-images.githubusercontent.com/5286751/148071099-b3193d80-5848-4ba8-9905-59906198d57d.png)
   
   
![image](https://user-images.githubusercontent.com/5286751/148071681-a2e52e3f-ad43-4535-b8cb-58cbc97ee0e5.png)
   




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