lihanyu1715446406-afk opened a new pull request, #11505: URL: https://github.com/apache/rocketmq/pull/11505
## What is the purpose of the change `ScheduleMessageService#messageTimeUp` encodes `propertiesString` from `msgExt.getProperties()` **before** removing the internal scheduling properties. `MessageAccessor.clearProperty` only removes entries from the in-memory property map, so the encoded wire data — which is what gets persisted and decoded by consumers — still carries `DELAY_TIME_LEVEL`, `TIMER_DELIVER_MS` and `TIMER_DELAY_SEC`. Move the encoding after the `clearProperty` calls and encode `msgInner.getProperties()`, matching the ordering already used by `TimerMessageStore#convertMessage` (the timer-wheel path fixed in #10972). ## Brief changelog - Encode `propertiesString` after the internal properties are cleared. - Add `ScheduleMessageServiceTest#testMessageTimeUpPropertiesStringMatchesProperties`, which asserts that the delivered message's `propertiesString` contains none of the internal properties and equals a re-encoding of the final property map. ## Verifications - Without the production change, the new test fails with `AssertionError` on `assertFalse(delivered.getPropertiesString().contains(PROPERTY_DELAY_TIME_LEVEL))`. - With the change: `Tests run: 5, Failures: 0, Errors: 0, Skipped: 0`. Fixes #11037. Note: an earlier attempt, #11038, was closed unmerged. This PR is an independent implementation of the fix with a regression test, as the issue is still open. -- 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]
