hust419 opened a new issue, #6977: URL: https://github.com/apache/rocketmq/issues/6977
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/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 Linux CentOS7 ### RocketMQ version 4.7.1 ### JDK Version _No response_ ### Describe the Bug 代码片段如下:这段代码来自https://github.com/apache/rocketmq-flink/的早期版本 this.executor.execute( () -> { RetryUtil.call( () -> { while (runningChecker.isRunning()) { try { long offset = getMessageQueueOffset(mq); PullResult pullResult = consumer.pullBlockIfNotFound( mq, tag, offset, pullBatchSize); 可以看到这个地方调用了getMessageQueueOffset,最终调用了这个方法 MQClientInstance.java public String findBrokerAddressInPublish(final String brokerName) { HashMap<Long/* brokerId */, String/* address */> map = this.brokerAddrTable.get(brokerName); if (map != null && !map.isEmpty()) { return map.get(MixAll.MASTER_ID); } return null; } 这个方法里面有个重大缺陷,他只会去master节点获取信息,如果master节点宕机不存在了,他就会返回null,整个程序也就不可用了 ### Steps to Reproduce 部署结构是1主1从,下线broker-master节点,观察消费情况发现无法正常消费 ### What Did You Expect to See? 下线broker-master节点后,应该从broker-slave节点继续消费,拉取信息,而不是挂掉,不影响消费 ### What Did You See Instead? 下线broker节点之后,程序发生异常,无法拉取到最新offset,因此无法继续消费 ### Additional Context _No response_ -- 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: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org