rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] mqAdmin consumerProgress execute error: No topic route info in name server for the topic: %RETRY%xxx

Open Yelijah opened this issue 1 year ago • 0 comments

Before Creating the Bug Report

  • [X] I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • [X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

macos 13.2.1 cpu:x86_64

RocketMQ version

server version: 5.1.4 java client version: 5.0.5

JDK Version

openjdk version "1.8.0_265"

Describe the Bug

i create a topic , a consumeGroup by admintool and a consumer by java client. The consumer can accept message successfully, but i can't use ./mqadmin consumerProgress to query the consume process. Here is the error:

./bin/mqadmin consumerProgress -n 192.168.250.2:9876 -g fifoRetryConsumerGroup -s true
org.apache.rocketmq.tools.command.SubCommandException: ConsumerProgressSubCommand command failed
	at org.apache.rocketmq.tools.command.consumer.ConsumerProgressSubCommand.execute(ConsumerProgressSubCommand.java:262)
	at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:165)
	at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:115)
Caused by: org.apache.rocketmq.client.exception.MQClientException: CODE: 17  DESC: No topic route info in name server for the topic: %RETRY%fifoRetryConsumerGroup
See https://rocketmq.apache.org/docs/bestPractice/06FAQ for further details.
	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:2041)
	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:2012)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.examineTopicRouteInfo(DefaultMQAdminExtImpl.java:590)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.examineConsumeStats(DefaultMQAdminExtImpl.java:436)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.examineConsumeStats(DefaultMQAdminExt.java:307)
	at org.apache.rocketmq.tools.admin.DefaultMQAdminExt.examineConsumeStats(DefaultMQAdminExt.java:300)
	at org.apache.rocketmq.tools.command.consumer.ConsumerProgressSubCommand.execute(ConsumerProgressSubCommand.java:116)
	... 2 more

Steps to Reproduce

step 1: create a topic and consumeGroup by mqadmin:

./bin/mqadmin updateTopic -c standalone -t fifoTopic -o true -n 127.0.0.1:9876 -a +message.type=FIFO
./bin/mqadmin updateSubGroup -n 127.0.0.1:9876 -c standalone -g fifoConsumerGroup -o true

step 2: create a consumer by java client

        PushConsumer consumer = provider.newPushConsumerBuilder()
                .setConsumerGroup(consumerGroup)
                .setClientConfiguration(clientConfiguration)
                .setConsumptionThreadCount(1) 
                .setSubscriptionExpressions(Collections.singletonMap(topic, new FilterExpression()))
                .setMessageListener(new MessageListener() {
                    private final Random random = new Random();
                    @Override
                    public ConsumeResult consume(MessageView messageView) {
                        CommonUtils.log("receive msg:%s", messageView);
                        CommonUtils.sleep(random.nextInt(5));
                        if (retryMsg != null && ByteBufferUtils.toString(messageView.getBody()).startsWith(retryMsg)) {
                            CommonUtils.log("consume failed msg:%s", messageView);
                            return ConsumeResult.FAILURE;
                        }
                        return ConsumeResult.SUCCESS;
                    }}
                ).build();
        Thread.sleep(3600 * 1000);
        consumer.close();

step 3: mqadmin consumerProgress -n 192.168.250.2:9876 -g fifoRetryConsumerGroup

What Did You Expect to See?

I want the commad consumerProgress can be executed successfully.

What Did You See Instead?

the commad consumerProgress error

Additional Context

No response

Yelijah avatar Feb 18 '24 11:02 Yelijah