TingFeng-Git commented on issue #9518:
URL: https://github.com/apache/rocketmq/issues/9518#issuecomment-3555610945
所以若想使用acl2.0,其实只用在proxy中设置认证授权即可?broker不用开启是嘛
---原始邮件---
发件人: ***@***.***>
发送时间: 2025年11月20日(周四) 上午10:21
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [apache/rocketmq] [Bug] rocketmq5.3.x, 开启 acl 2.0,消费者接收不到消息 (Issue
#9518)
dingshuangxi888 left a comment (apache/rocketmq#9518)
根因:
pop接口要求传递bornTime,
在存算分离架构里面,这个bornTime为了防止proxy和broker的机器出现时钟偏差,所以没有传,让broker自己设置,但是broker上设置的是RemotingCommand#extFields这个值。
当开启ACL2.0的时候,为了能够获取到POP请求的参数,会提前进行一次deocde,这会导致RemotingCommand#cachedHeader已经缓存了旧值,因此上面的设置是无效的
消费消息的时候,由于这个bornTime没有正确设置,服务端在计算System.currentTimeMillis() - bornTime -
pollTime > 500的永远返回true, 就报"the broker[%s] pop message is timeout too
much"这个异常,一直拉不到消息
修复方法: bornTime的设置基于decode之后的对象进行设置
,你们是怎么访问的,客户端访问的proxy吗,还是broker, 然后用的是remoting客户端还
proxy和broker分离部署,使用gRPC访问proxy,
可以正常发送消息,消息时无法获取消息(POP方式),客户端和服务端proxy,broker均无异常日志。
还有个前提是开启ACL2.0,使用ACL1.0就没有这个问题。
我看到你提的修复了,应该就是bronTime的问题,我纳闷的是这应该是一个影响极大的BUG,尤其是5.3.3只能使用acl2.0的版本,结果反映的人却寥寥无几,官方也没有回应。
大部分的用户,在部署proxy之后,broker不会开启ACL,所以不会有这个问题。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
--
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]