yx9o opened a new pull request, #6251:
URL: https://github.com/apache/rocketmq-dashboard/pull/6251
### Brief Description
When `targetTopic` is omitted, DLQ resend derives each destination from the
original-topic or retry-topic property. These inferred destinations bypassed
the cluster check applied to explicit targets, allowing messages to be replayed
into another cluster sharing the same NameServer.
Preflight all distinct, nonempty inferred destinations against the DLQ
topic's cluster before obtaining a producer. Reject a known cluster mismatch
with business code 409 before sending any message in the batch.
Reuse the existing route check for both time-range and selected-message
resends. Same-cluster resends, missing-origin failures, and unresolved-route
handling retain their existing behavior.
### How Did You Test This Change?
- `cd server && mvn -B -ntp
-Dtest=RocketMQDLQProviderTest,DLQServiceTest,DLQControllerTest,DLQMessageExcelRowTest
test`
- 113 tests passed, with zero failures, errors, or skipped tests.
- Compilation and Checkstyle passed.
- Five regression cases failed against the original code and passed after
the fix.
- Coverage includes both resend entry points, both origin properties,
whole-batch rejection before producer use, duplicate destinations, same-cluster
replay, missing origins, and unresolved routes.
- `git diff --check` passed.
Routes and RocketMQ clients are mocked. No live Broker integration test was
run.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [ ] Commit subject follows Conventional Commits — commit to be created by
the contributor
- [x] Tests added or updated for non-trivial changes, test methods named
`...Test`
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
— not applicable; no UI text added
- [ ] Architecture constraints stay green — the focused suite did not run
ArchUnit checks
- [x] New source files carry the ASF license header — not applicable; no new
source files
- [x] Documentation touched where behaviour changed — no update needed; this
extends the existing cluster check to inferred targets
--
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]