tju-yxq opened a new pull request, #1408: URL: https://github.com/apache/rocketmq-dashboard/pull/1408
## What is the purpose of the change Fixes #1407 Two separate `isSystemTopic` implementations had inconsistent filtering rules, causing system topics to leak into topic lists and inflate dashboard topic counts. The `DashboardProvider` also had hardcoded broker names (`broker-a`, `broker-b`) instead of using the live cluster topology. ## Brief changelog - **New `SystemTopicFilter.java`**: Shared utility class consolidating all system topic prefixes and exact-match names from both implementations. - **`RocketMQMetadataProvider.java`**: Replaced `isSystemTopic` with call to `SystemTopicFilter.isSystem()`. - **`RocketMQDashboardProvider.java`**: Replaced `isSystemTopic` with call to `SystemTopicFilter.isSystem()`. Removed hardcoded `broker-a`/`broker-b` and added `CID_`, `broker_`, `BenchmarkTest` filters. ## Verifying this change 1. Start a RocketMQ cluster with `CID_RMQ_SYS_*` system topics. 2. Before fix: DashboardProvider does not filter `CID_` topics, inflating the count. 3. After fix: `CID_` topics are filtered consistently in both providers. - [x] Make sure there is a Github issue filed for the change. - [x] Format the pull request title like `[ISSUE #1407] ...`. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit-test to verify your logic correction. - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. - [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement. -- 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]
