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/09/05 04:16:21 UTC
[I] Client Connections ignores the backend cluster and type filters [rocketmq-dashboard]
tju-yxq opened a new issue, #3291:
URL: https://github.com/apache/rocketmq-dashboard/issues/3291
## Problem
The Client Connections page always asks the backend for every connection:
```ts
void listConnections({ namesrvAddr: selectedEndpoint })
```
The backend endpoint already supports two filters:
```java
@RequestParam(required = false) String clusterId,
@RequestParam(required = false) String type
```
The frontend ignores both. It loads the full client inventory, then filters locally by cluster and table column filters. On a large cluster this makes the page slower than necessary and transfers rows the user has already excluded.
The page-level cluster selector can only filter after all producer and consumer connections have been collected.
## Expected behavior
- Send the selected cluster filter to `/api/clients`.
- Send the selected client type filter to `/api/clients`.
- Keep local diagnostics and export based on the returned filtered set.
- Reset to the first page when filters change.
- Preserve existing request ownership and error behavior.
- Avoid sending a redundant request when only local column filters change.
## Why this matters
Client inventories can be large. Operators often inspect one cluster or one client type while diagnosing a connection problem. Filtering at the backend reduces response size and avoids paying for a full client scan when only a subset is needed.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Client Connections ignores the backend cluster and type filters [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #3291: Client Connections ignores the backend cluster and type filters
URL: https://github.com/apache/rocketmq-dashboard/issues/3291
--
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: [I] Client Connections ignores the backend cluster and type filters [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #3291:
URL: https://github.com/apache/rocketmq-dashboard/issues/3291#issuecomment-5581001945
Resolved by #3294, merged into `rocketmq-studio` as 895498a7.
The Client Connections page now forwards `clusterId` and `type` to the backend query parameters that already existed but were never sent, refetches when either filter changes, resets pagination to page 1 on filter change, and derives statistics, diagnostics, table rows and the CSV export from the server-filtered response instead of filtering a full inventory in the browser.
Two follow-on details worth noting:
- The cluster selector no longer collapses. It previously derived its options solely from `connections.map(c => c.clusterName)`, so filtering one response made the other clusters disappear from the dropdown and an unfiltered `clusterName` could contribute a null option. It now unions the registry cluster names (`registryClusters` → `nsClusterName`) with the connection cluster names, both with `.filter(Boolean)`.
- Type filter options reuse the existing `typeConfig` labels (`Producer` / `Consumer`), which are language-neutral technical identifiers, so no new translation keys were needed.
Because this repository squash-merges against `rocketmq-studio` rather than the default branch, GitHub does not auto-close issues referenced in a PR body; closing manually.
--
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: [I] Client Connections ignores the backend cluster and type filters [rocketmq-dashboard]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #3291:
URL: https://github.com/apache/rocketmq-dashboard/issues/3291#issuecomment-5549525201
**Issue Evaluation**
Category: `enhancement` | Status: **Evaluated**
**Feasibility:** Feasible
**Scope:** Frontend `ClientsPage` (`web/src/pages/cluster/clients.tsx`), service layer already supports the parameters
**Compatibility:** No breaking changes — backend already accepts `clusterId` and `type` as optional query params
Verified against the current codebase:
1. **Backend** (`ClientController.java`): `/api/clients` already accepts `clusterId` and `type` as optional `@RequestParam` filters.
2. **API layer** (`web/src/api/connections.ts`): `ClientConnectionQuery` interface already defines `clusterId?` and `type?`, and `listConnections()` passes them as query params.
3. **Service layer** (`web/src/services/connectionsService.ts`): Already filters by `clusterId` and `type` in both mock and real modes.
4. **Page** (`web/src/pages/cluster/clients.tsx`): Calls `listConnections({ namesrvAddr: selectedEndpoint })` — only passes `namesrvAddr`, ignoring the available filters.
The fix is well-scoped:
- Pass `clusterId` when `clusterFilter !== "ALL"` to the `listConnections()` call
- Add a page-level type selector (Producer/Consumer) and pass it as `type`
- Reset to page 1 when either filter changes
- Avoid redundant API calls when only local column filters change (current table `onFilter` is client-side only)
- Keep existing diagnostics, export, and error behavior intact
This is a good first issue for contributors familiar with the React frontend.
---
*Automated evaluation by github-manager*
--
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