MessageExtEncoder#encode(MessageExtBrokerInner) 计算消息长度是否超过最大允许的消息长度,是不是有问题? #9169
Answered
by
coolmoon101
coolmoon101
asked this question in
Q&A
-
RocketMQ 版本5.3.1,计算msgLen时并没有包含crc32的长度,最后写入了crc32的数据。 public PutMessageResult encode(MessageExtBrokerInner msgInner) {
|
Beta Was this translation helpful? Give feedback.
Answered by
coolmoon101
Feb 9, 2025
Replies: 1 comment
-
已经找到问题:propertiesLength 这里已经加上了 crc32ReservedLength 的长度 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
coolmoon101
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
已经找到问题:propertiesLength 这里已经加上了 crc32ReservedLength 的长度
final int propertiesLength = (propertiesData == null ? 0 : propertiesData.length)
+ (needAppendLastPropertySeparator ? 1 : 0) + crc32ReservedLength;