fuyou001 commented on PR #10814:
URL: https://github.com/apache/rocketmq/pull/10814#issuecomment-5191142178

   **Non-blocking readability suggestion: separate LMQ offset preparation from 
legacy property-order handling**
   
   `prepareLmqDispatch()` currently has two responsibilities: (1) parsing queue 
names and populating `PROPERTY_INNER_MULTI_QUEUE_OFFSET`, and (2) removing and 
reinserting `WAIT_STORE_MSG_OK` to preserve the legacy serialized property 
order. The second behavior is an unexpected side effect that is not reflected 
by the method name and is unrelated to LMQ offset preparation.
   
   Consider extracting the WAIT-order operation into a clearly named helper and 
invoking it immediately before `MessageDecoder.messageProperties2String()` in 
`handlePropertiesForLmqMsg()`. This would keep `prepareLmqDispatch()` focused 
on queue names and offsets while keeping the byte-compatibility logic next to 
the serialization it affects. The existing exact-legacy-bytes regression 
assertion should be retained.


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