mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-21 05:44:03 +08:00
[ISSUE#4263] Delete topic route info based on cluster when delete topic. (#4268)
* Delete topic route info based on cluster when delete topic. * Delete useless compatibility code. * 1.add a non-null judgment to queueDataMap 2.move the judgment of whether there are any key-value pairs in queueDataMap out of the for loop * When clusterName is null, then delete topic route info in namesrv.
This commit is contained in:
@@ -1494,10 +1494,11 @@ public class MQClientAPIImpl {
|
||||
throw new MQClientException(response.getCode(), response.getRemark());
|
||||
}
|
||||
|
||||
public void deleteTopicInNameServer(final String addr, final String topic, final long timeoutMillis)
|
||||
public void deleteTopicInNameServer(final String addr, final String topic, final String clusterName, final long timeoutMillis)
|
||||
throws RemotingException, InterruptedException, MQClientException {
|
||||
DeleteTopicFromNamesrvRequestHeader requestHeader = new DeleteTopicFromNamesrvRequestHeader();
|
||||
requestHeader.setTopic(topic);
|
||||
requestHeader.setClusterName(clusterName);
|
||||
RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_TOPIC_IN_NAMESRV, requestHeader);
|
||||
|
||||
RemotingCommand response = this.remotingClient.invokeSync(addr, request, timeoutMillis);
|
||||
|
||||
Reference in New Issue
Block a user