You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "tju-yxq (via GitHub)" <gi...@apache.org> on 2026/08/10 04:49:27 UTC
[PR] [ISSUE #1394] Populate per-cluster topics and groups count in dashboard [rocketmq-dashboard]
tju-yxq opened a new pull request, #1400:
URL: https://github.com/apache/rocketmq-dashboard/pull/1400
## What is the purpose of the change
Fixes #1394
The dashboard's per-cluster overview cards were always showing `topics(0)` and `groups(0)` for every cluster, even though the global totals at the top of the dashboard were correct. This made it look like no cluster had any topics or groups.
## Brief changelog
- **`RocketMQDashboardProvider.java`**: Added a `brokerAddrToCluster` map built from `ClusterInfo.clusterAddrTable` + `brokerAddrTable`.
- **Topic counting**: For each non-system topic, look up its route data (`examineTopicRouteInfo`) to find which broker hosts it, then map that broker to its cluster. Accumulate per-cluster topic counts in `topicsByCluster`.
- **Group counting**: When iterating brokers for subscription groups, associate each group with its broker's cluster. Accumulate per-cluster group counts in `groupsByCluster`.
- **ClusterOverviewVO**: Changed from hardcoded `.topics(0).groups(0)` to `.topics(topicsByCluster.getOrDefault(clusterName, 0)).groups(groupsByCluster.getOrDefault(clusterName, 0))`.
## Verifying this change
1. Start a RocketMQ cluster with topics and consumer groups.
2. Open the dashboard.
3. Each cluster card should now show the actual topic and group counts instead of 0.
- [x] Make sure there is a Github issue filed for the change.
- [x] Format the pull request title like `[ISSUE #1394] ...`.
- [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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #1394] Populate per-cluster topics and groups count in dashboard [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #1400:
URL: https://github.com/apache/rocketmq-dashboard/pull/1400
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #1394] Populate per-cluster topics and groups count in dashboard [rocketmq-dashboard]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #1400:
URL: https://github.com/apache/rocketmq-dashboard/pull/1400#issuecomment-5237241556
⚠️ **Merge conflict detected**
This PR has conflicts with the base branch and cannot be merged. Please rebase or merge the base branch into your branch and resolve the conflicts:
```bash
git fetch origin
git checkout fix/dashboard-cluster-topics-groups-zero-1394
git rebase origin/develop
# resolve conflicts, then:
git push --force-with-lease
```
This is a one-time reminder. Feel free to @mention me for a re-review after conflicts are resolved.
---
*Automated notification by github-manager-bot*
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org