Yelijah commented on issue #7830:
URL: https://github.com/apache/rocketmq/issues/7830#issuecomment-1985217843

   > > ```
   > > public TopicRouteData getTopicRouteInfoFromNameServer(final String 
topic, final long timeoutMillis,
   > >         boolean allowTopicNotExist) throws MQClientException, 
InterruptedException, RemotingTimeoutException, RemotingSendRequestException, 
RemotingConnectException {
   > >         GetRouteInfoRequestHeader requestHeader = new 
GetRouteInfoRequestHeader();
   > >         requestHeader.setTopic(topic);
   > >         RemotingCommand request = 
RemotingCommand.createRequestCommand(RequestCode.GET_ROUTEINFO_BY_TOPIC, 
requestHeader);
   > > 
   > >         RemotingCommand response = this.remotingClient.invokeSync(null, 
request, timeoutMillis);
   > >         assert response != null;
   > >         switch (response.getCode()) {
   > >             case ResponseCode.TOPIC_NOT_EXIST: {
   > >                 if (allowTopicNotExist) {
   > >                     log.warn("get Topic [{}] RouteInfoFromNameServer is 
not exist value", topic);
   > >                 }
   > > 
   > >                 break;
   > >             }
   > >             case ResponseCode.SUCCESS: {
   > >                 byte[] body = response.getBody();
   > >                 if (body != null) {
   > >                     return TopicRouteData.decode(body, 
TopicRouteData.class);
   > >                 }
   > >             }
   > >             default:
   > >                 break;
   > >         }
   > > 
   > >         throw new MQClientException(response.getCode(), 
response.getRemark());
   > >     }
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > if allowTopicNotExist is true, maybe we shoud not throw
   > > ```
   > >     throw new MQClientException(response.getCode(), 
response.getRemark());
   > > ```
   > 
   > 
![image](https://private-user-images.githubusercontent.com/21963954/305904578-bdd7c3fb-41af-4116-b4d1-e0256dc49e5f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk4ODQ3ODQsIm5iZiI6MTcwOTg4NDQ4NCwicGF0aCI6Ii8yMTk2Mzk1NC8zMDU5MDQ1NzgtYmRkN2MzZmItNDFhZi00MTE2LWI0ZDEtZTAyNTZkYzQ5ZTVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzA4VDA3NTQ0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlZWUxNGVjZWYyMmViOTZkZWYyNDM5MjdjMTRmN2VkNGNlN2RmMGZmYTU3MTc4OWFjZDdjNzQwNTg3MGM5YTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6TRNTSZfMmaXMf66Qffkf7CETuAk35diJjmtikcZpD8)
 The exception is caught here, so if `-t` is added, at least there will be a 
route.
   
   The error happened whether use -t or not. 


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