vongosling commented on a change in pull request #57:
URL: https://github.com/apache/rocketmq-dashboard/pull/57#discussion_r778490497
##########
File path:
src/main/java/org/apache/rocketmq/dashboard/service/impl/ConsumerServiceImpl.java
##########
@@ -296,14 +296,22 @@ public boolean apply(MessageQueue o) {
@Override
public boolean deleteSubGroup(DeleteSubGroupRequest deleteSubGroupRequest)
{
+ Set<String> brokerSet =
this.fetchBrokerNameSetBySubscriptionGroup(deleteSubGroupRequest.getGroupName());
+ List<String> brokerList = deleteSubGroupRequest.getBrokerNameList();
+ boolean deleteInNsFlag = false;
+ // If the list of brokers passed in by the request contains the list
of brokers that the consumer is in,
+ // delete RETRY and DLQ topic in namesrv
Review comment:
//Delete... The first letter of the comment is capitalized and the style
is consistent.
##########
File path:
src/main/java/org/apache/rocketmq/dashboard/service/impl/ConsumerServiceImpl.java
##########
@@ -312,14 +320,16 @@ public boolean deleteSubGroup(DeleteSubGroupRequest
deleteSubGroupRequest) {
return true;
}
- private void deleteResources(String topic, String brokerName, ClusterInfo
clusterInfo) throws Exception {
+ private void deleteResources(String topic, String brokerName, ClusterInfo
clusterInfo, boolean deleteInNsFlag) 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);
+ if (deleteInNsFlag) {
Review comment:
Any unit test coverage for this logic?
--
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]