XiaoZYang opened a new issue #377: Admin subcommand consumeMessage should quit when catch exception URL: https://github.com/apache/rocketmq/issues/377 ## **BUG REPORT** ### Problem Description When I use the admin command `mqadmin consumeMessage -t TestTopic` I got the **MQClientException** with a message "Can not find Message Queue for this topic, TestTopic", the full stack trace is ``` org.apache.rocketmq.client.exception.MQClientException: Can not find Message Queue for this topic, TestTopic See http://rocketmq.apache.org/docs/faq/ for further details. at org.apache.rocketmq.client.impl.MQAdminImpl.fetchSubscribeMessageQueues(MQAdminImpl.java:162) at org.apache.rocketmq.client.impl.consumer.DefaultMQPullConsumerImpl.fetchSubscribeMessageQueues(DefaultMQPullConsumerImpl.java:136) at org.apache.rocketmq.client.consumer.DefaultMQPullConsumer.fetchSubscribeMessageQueues(DefaultMQPullConsumer.java:225) at org.apache.rocketmq.tools.command.message.ConsumeMessageCommand.executeDefault(ConsumeMessageCommand.java:237) at org.apache.rocketmq.tools.command.message.ConsumeMessageCommand.execute(ConsumeMessageCommand.java:182) at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:132) at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:83) Caused by: org.apache.rocketmq.client.exception.MQClientException: CODE: 17 DESC: No topic route info in name server for the topic: TestTopic See http://rocketmq.apache.org/docs/faq/ for further details. at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1232) at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1202) at org.apache.rocketmq.client.impl.MQAdminImpl.fetchSubscribeMessageQueues(MQAdminImpl.java:151) ... 6 more ``` but the mqadmin command **hangs up and doesn't quit** as expected. ### Environment Details - OS: OSX El Caption Version 10.11.6 - Java version: 1.8.0_172 - RocketMQ version: 4.2.0 ### FIX suggestion the `mqadmin` command should quit when catch exception
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
