Skip to content

Commit

Permalink
Topic creation and deletion commands act on slave nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
guyinyou committed Sep 13, 2023
1 parent 4a8e0d5 commit c68d886
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void deleteTopic(final DefaultMQAdminExt adminExt,
final String topic
) throws InterruptedException, MQBrokerException, RemotingException, MQClientException {

Set<String> masterBrokerAddressSet = CommandUtil.fetchMasterAddrByClusterName(adminExt, clusterName);
Set<String> masterBrokerAddressSet = CommandUtil.fetchMasterAndSlaveAddrByClusterName(adminExt, clusterName);
adminExt.deleteTopicInBroker(masterBrokerAddressSet, topic);
System.out.printf("delete topic [%s] from cluster [%s] success.%n", topic, clusterName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void execute(final CommandLine commandLine, final Options options,
defaultMQAdminExt.start();

Set<String> masterSet =
CommandUtil.fetchMasterAddrByClusterName(defaultMQAdminExt, clusterName);
CommandUtil.fetchMasterAndSlaveAddrByClusterName(defaultMQAdminExt, clusterName);
for (String addr : masterSet) {
defaultMQAdminExt.createAndUpdateTopicConfig(addr, topicConfig);
System.out.printf("create topic to %s success.%n", addr);
Expand Down

0 comments on commit c68d886

Please sign in to comment.