RockteMQ-AI commented on PR #10564: URL: https://github.com/apache/rocketmq/pull/10564#issuecomment-4857092687
## Review by github-manager-bot (Re-review after new commit) ### Summary Re-reviewed after commit `cccf293` (2026-07-01T07:00Z). Stores the original producer's `clientId` in half message properties and prefers that producer's channel during transaction check-back, with round-robin fallback. ### Assessment: ✅ Looks Good **Changes since initial review:** - `makeSureStateOK()` added at the start of `sendMessageInTransaction()` — good defensive check ensuring the producer is in a valid state before sending transactional messages. - `PROPERTY_TRANSACTION_PRODUCER_CLIENT_ID` added to `STRING_HASH_SET` — maintains hash-set consistency for property validation. - Additional test `testGetAvailableChannelWithNullGroupId` — verifies null-safety when `groupId` is null with non-null `preferredClientId`. **Code quality:** - **Null safety** — `getAvailableChannel(groupId, preferredClientId)` handles null `groupId` (returns null) and null `preferredClientId` (falls through to round-robin). No NPE risk. - **Backward compatibility** — Old producers without the clientId property will have `getUserProperty()` return null, triggering the round-robin fallback. Fully backward compatible. - **Property naming** — `__TXN_PRODUCER_CID__` is concise and follows existing property naming conventions. - **Test coverage** — 4 test cases: match, fallback, null clientId, null groupId. Comprehensive. Well-structured fix with clean separation of concerns. -- 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]
