GitHub user orangehedgehog3 added a comment to the discussion: lockBatchMQ的超时时间不可以设置么?
目前(5.5.x)不能通过配置修改。MQClientAPIImpl#lockBatchMQ 本身是有 timeout 参数的,但 RebalanceImpl#lock 和 #lockAll 调用时把 1000ms 硬编码了,也没有暴露成配置项。 另外容易混淆的是 rocketmq.client.rebalance.lockMaxLiveTime:它是客户端判断队列锁是否过期的时长(默认 30s, 见 ProcessQueue),不是这次 lockBatchMQ RPC 的超时。 如果确实需要可配置,可以提 PR 加到 DefaultMQPushConsumer / RebalancePushImpl 里。但要注意 rebalance 是按 broker 串行处理的,超时调大可能拖慢整个 rebalance 周期,通常 1s 够用;如果经常超时,建议先排查 broker 负载和网络。 GitHub link: https://github.com/apache/rocketmq/discussions/10952#discussioncomment-19861705 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
