leizhiyuan opened a new pull request, #1535:
URL: https://github.com/apache/rocketmq-dashboard/pull/1535
## Summary
Adds Topic management support for Tencent Cloud RocketMQ 5.x instances on
the `rocketmq-studio`
branch, mapping the Tencent `provider/tencent` (Trocket v20230308 OpenAPI)
to the instance-scoped
topic CRUD surface. Fixes #1534.
## Changes
**Topic management (Tencent provider)**
- `listTopics` - `DescribeTopicList` pagination + type/name/remark filter;
enriches created/updated
timestamps per topic via `DescribeTopic` (millisecond timestamps, tolerant
of second precision).
- `createTopic` / `updateTopic` / `deleteTopic` - `CreateTopic` /
`ModifyTopic` / `DeleteTopic`.
- `getTopicConsumers` - `DescribeTopic` subscription data (group, consume
type, message model, lag).
- `countTopics` - cheap list path without N+1 detail lookups.
- Validation: rejects `LiteTopic` (not supported by Tencent Cloud),
validates queue counts and the
cloud credential/instance binding.
**Frontend (`topic.tsx`)**
- Date formatter renders missing/empty timestamps as `-` instead of
`1970-01-01 08:00:00`.
- Moved the no-instance reset out of the synchronous effect body to satisfy
`react-hooks/set-state-in-effect`.
**Pre-existing build/startup fixes (separate commit, not part of the topic
feature)**
- `AlertService` - add `java.util.regex.Pattern` import.
- `RocketMQMetadataProvider` / `RocketMQDashboardProvider` - import
`SystemTopicFilter`.
- `RocketMQDLQProvider` - `MessageExt#getProperties()` (rocketmq-tools 5.5.0
has no `getUserProperties()`).
- `RocketMQMessageProvider` - resolve message by offset id for the trace
window (`viewMessage(String)` removed).
- `GrafanaDashboardService` - mark public constructor `@Autowired` so Spring
picks it over the
package-private two-arg constructor.
## Testing
- Unit tests added for the Tencent provider (list/enrich, create,
update+delete, consumers).
- Backend: `mvn -Dtest=TencentInstanceProviderTest test` passes; checkstyle
clean.
- Frontend: `tsc -b` passes; pre-commit eslint/prettier clean.
- Manually verified against a real Tencent Cloud RocketMQ 5.x instance:
topic list shows correct
created times (no more 1970-01-01), create/update/delete and consumer
views work.
## Notes
- Scoped to `rocketmq-studio`; consumer-group/message/trace ops for Tencent
remain unsupported.
- The build/startup fixes are in a separate commit so the functional change
is reviewable on its own.
--
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]