You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "lzkisok (via GitHub)" <gi...@apache.org> on 2023/12/01 09:59:58 UTC
[I] 项目升级rocketmq-client 5.1.4版本后,org.apache.rocketmq.mqtt.ds.store.LmqQueueStoreManager#maxOffset 方法,报throw new MQClientException("The broker[" + queue.getBrokerName() + "] not exist", null); [rocketmq-mqtt]
lzkisok opened a new issue, #228:
URL: https://github.com/apache/rocketmq-mqtt/issues/228
原因如下:

如上图,获取不到brokerAddr
更近一步的原因是:


如上图,DefaultMQPullConsumer,没有topic,不会调用this.updateTopicRouteInfoFromNameServer(topic);导致this.brokerAddrTable为空,获取失败
this.updateTopicRouteInfoFromNameServer() 方法在rocketmq-client 4.9.3版本中的写法如下图:

可以正常调用。
--
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-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 项目升级rocketmq-client 5.1.4版本后,org.apache.rocketmq.mqtt.ds.store.LmqQueueStoreManager#maxOffset 方法,报throw new MQClientException("The broker[" + queue.getBrokerName() + "] not exist", null); [rocketmq-mqtt]
Posted by "DongyuanPan (via GitHub)" <gi...@apache.org>.
DongyuanPan commented on issue #228:
URL: https://github.com/apache/rocketmq-mqtt/issues/228#issuecomment-1837899458
下面这个逻辑也没走到吗?

--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 项目升级rocketmq-client 5.1.4版本后,org.apache.rocketmq.mqtt.ds.store.LmqQueueStoreManager#maxOffset 方法,报throw new MQClientException("The broker[" + queue.getBrokerName() + "] not exist", null); [rocketmq-mqtt]
Posted by "lzkisok (via GitHub)" <gi...@apache.org>.
lzkisok commented on issue #228:
URL: https://github.com/apache/rocketmq-mqtt/issues/228#issuecomment-1844198246

如上图,在执行quene.toFirstTopic时,返回的topic时p2p和retry,所以上面的逻辑走到了,但是还是拿不到brokerAddr
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 项目升级rocketmq-client 5.1.4版本后,org.apache.rocketmq.mqtt.ds.store.LmqQueueStoreManager#maxOffset 方法,报throw new MQClientException("The broker[" + queue.getBrokerName() + "] not exist", null); [rocketmq-mqtt]
Posted by "DongyuanPan (via GitHub)" <gi...@apache.org>.
DongyuanPan commented on issue #228:
URL: https://github.com/apache/rocketmq-mqtt/issues/228#issuecomment-1846874228
>  请问目前我的解决办法是否够优雅?
不建议这么修改,可以修改下面的代码取到正确的topic:
quene.toFirstTopic时,判断一下是p2p和retry吗?如果是的话,就返回对应参数设置的p2p和retry的topic(这两个topic在配置里面要求提前在broker创建了)。
不过如果broker集群没有扩缩容,这个报错应该只会第一次出现一次吧,后续有别的topic(一级topic)会更新相应的broker地址。
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 项目升级rocketmq-client 5.1.4版本后,org.apache.rocketmq.mqtt.ds.store.LmqQueueStoreManager#maxOffset 方法,报throw new MQClientException("The broker[" + queue.getBrokerName() + "] not exist", null); [rocketmq-mqtt]
Posted by "lzkisok (via GitHub)" <gi...@apache.org>.
lzkisok commented on issue #228:
URL: https://github.com/apache/rocketmq-mqtt/issues/228#issuecomment-1835810291

请问目前我的解决办法是否够优雅?
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org