fangm0137 opened a new pull request, #11557:
URL: https://github.com/apache/rocketmq/pull/11557

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11556
   
   ### Brief Description
   
   `printMsgByQueue` stops on `NO_MATCHED_MSG` even when the pull result 
advances `nextBeginOffset`, so a later batch with matching messages can be 
skipped. Continue scanning when the unmatched result advances the offset, and 
stop when it does not advance. The command still stops on `NO_NEW_MSG` or 
`OFFSET_ILLEGAL`.
   
   ### How Did You Test This Change?
   
   Ran `PrintMessageByQueueCommandTest` with JUnit 4.13.2 using the upstream 
command sources compiled with `javac --release 8` and local RocketMQ 5.5.0 
distribution jars. The scripted consumer returned an unmatched batch at offset 
0 and a matching `TagA` message at offset 32. The regression failed before the 
fix because the command only requested offset 0. All six tests passed after the 
fix, including the case where the unmatched result did not advance the offset.


-- 
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]

Reply via email to