HZL3151904214 opened a new issue, #1080:
URL: https://github.com/apache/rocketmq-client-go/issues/1080
consumer.go文件 lockAll函数更新UpdateLastLockTime存在bug?
问题:Clustering消费模式下顺序消费mq消息,概率性报错the message queue lock expired, so consume
later
根因分析:lockAll函数没有正常续约LastLockTime,导致consumeMessageOrderly函数执行到isLockExpired超时报错。
解决方法:参考defaultConsumer.lock函数实现,将UpdateLastConsumeTime和UpdateLastLockTime一起进行更新,
for idx := range lockedMQ {
_mq := lockedMQ[idx]
v, exist := dc.processQueueTable.Load(_mq)
if exist {
pq := v.(*processQueue)
pq.WithLock(true)
pq.UpdateLastConsumeTime()
pq.UpdateLastLockTime()
}
set[_mq] = true
}
--
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]