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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #10405
   
   ### Brief Description
   
   When an orderly consumer reaches `maxReconsumeTimes`, both the regular and 
POP orderly services publish the retry message with the default producer. 
Because the `%RETRY%` topic may not have publish route data yet, producer 
fallback can select a broker from `TBW102` that does not host the original 
business topic. This creates retry topics on unrelated brokers and makes 
retry-topic placement inconsistent with the consumed topic.
   
   This change:
   
   - adds one shared `OrderlyRetryMessageSender` for both orderly consumption 
paths;
   - resolves a snapshot of the business topic route, including 
`PROPERTY_RETRY_TOPIC` when a retry message is consumed again;
   - prefers the broker that supplied the original message, then fails over 
only to other brokers in the business topic route;
   - uses a fresh message and property copy for every send attempt so producer 
mutation cannot leak into later attempts or the consumed message;
   - preserves thread interruption and propagates the final targeted-send 
failure instead of falling back to an unrelated broker;
   - retains the previous default-producer behavior only when business topic 
route data is unavailable.
   
   The change is internal to the orderly retry path and introduces no public 
API changes.
   
   ### How Did You Test This Change?
   
   ```shell
   mvn -o -B -ntp -pl client -am 
-Dtest=OrderlyRetryMessageSenderTest,ConsumeMessageOrderlyServiceTest,ConsumeMessagePopOrderlyServiceTest
 -Dsurefire.failIfNoSpecifiedTests=false test
   ```
   
   Result: `BUILD SUCCESS`; 27 tests run, 0 failures, 0 errors, 0 skipped. The 
Maven lifecycle also completed Checkstyle with 0 violations and SpotBugs with 0 
findings for the affected reactor modules.
   
   The new tests cover original-broker preference, current-route filtering, 
cross-broker failover with fresh message copies, retry-message business-topic 
lookup, unavailable/empty route fallback, refusal to leave a known topic route, 
and interruption handling.


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