Cczzzz opened a new issue #3434:
URL: https://github.com/apache/rocketmq/issues/3434
It takes a long time for consumers to start to consume. max waiting time is
ClientConfig#heartbeatBrokerInterval = 1000*30
(30s).
and in broker broker.log,you will find :
2021-10-27 11:29:03 WARN PullMessageThread_35 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:03 WARN PullMessageThread_49 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:03 WARN PullMessageThread_62 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:03 WARN PullMessageThread_75 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:04 WARN PullMessageThread_33 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:04 WARN PullMessageThread_44 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:04 WARN PullMessageThread_55 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:04 WARN PullMessageThread_106 - The broker's subscription
is not latest, group: test_order *
2021-10-27 11:29:04 WARN PullMessageThread_102 - The broker's subscription
is not latest, group: test_order *
2021-10-27 11:29:05 WARN PullMessageThread_37 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:05 WARN PullMessageThread_109 - The broker's subscription
is not latest, group: test_order *
2021-10-27 11:29:05 WARN PullMessageThread_1 - The broker's subscription is
not latest, group: test_order *
2021-10-27 11:29:05 WARN PullMessageThread_4 - The broker's subscription is
not latest, group: test_order *
原因:
broker 中会比较 subscription 的版本号,这个版本号由客户端心跳上报。理论broker 的版本号和客户端是一致的。
在进行rebalance 时,如果rebalance 发生了变化(第一次启动会触发),就会更新本地的版本号,然后主动更新到broker。
RebalancePushImpl#83
// notify broker
this.getmQClientFactory().sendHeartbeatToAllBrokerWithLock();
理论上这样 客户端和broker 的版本号还是一样的。
但是在实际情况中,rebalance 完成后这时有可能心跳定时任务也在进行,这会导致获取 获取 lockHeartbeat 锁失败。无法发送心跳。此时
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]