zhanxuefeng commented on issue #4265: URL: https://github.com/apache/rocketmq/issues/4265#issuecomment-1122010891
I add some logs to describe the bug **RocketMQ version: 4.9.3** **The message I QueryMsgTraceById has a sub trace and a pub trace** ### QueryMessageProcessor  ### QueryMessageTransfer  ### FileRegionEncoder  ### NettyDecoder  ### Console log:  The `[QueryMessageProcessor] total bytes: 1021` indicate that 1021 bytes should be transferred, and `[QueryMessageProcessor] message count: 2` indicate that 2 messages was found. `[QueryMessageTransfer] header total bytes: 1017` 1017 is the length of data used by LengthFieldBasedFrameDecoder, in QueryMessageTransfer, the header is 193 bytes but 256 transferred, and the first message is 378 bytes but 1024 transferred, 1280(capacity 256 + capacity 1024) is greater than 1021, so the 2nd message will not be transferred, in actual, 571(header 193 + 1st message 378) bytes is transferred, but LengthFieldBasedFrameDecoder should get 1021 bytes ### NettyDecoder log  NettyDecoder get 571 bytes, and not more byte transferred. -- 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]
