apache / apache/rocketmq-dashboard
[Studio][Feature] Show the storage location (broker, queue, offset) on the message detail panel
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
## 1. 需求与来源
消息详情面板应显示消息的存储位置(Broker / Queue ID / Queue Offset)。来源:
- 父项目(master 经典版)消息详情弹窗已展示这两个字段:`frontend-new/src/components/MessageDetailViewDialog.jsx` L114-L116(`Queue ID`、`Queue Offset`,perma-link:[770822bb](https://github.com/apache/rocketmq-dashboard/blob/770822bb/frontend-new/src/components/MessageDetailViewDialog.jsx#L114-L116))。
- 成熟同类产品均展示消息的分区/偏移定位:kafka-ui 消息表自带 `Offset`、`Partition` 列([83b5a60c MessagesTable.tsx#L71-L72](https://github.com/provectus/kafka-ui/blob/83b5a60c/kafka-ui-react-app/src/components/Topics/Topic/Messages/MessagesTable.tsx#L71-L72));AKHQ 按分区/偏移检索并定位单条消息([602d69df TopicData.jsx#L384-L391](https://github.com/tchiotludo/akhq/blob/602d69df/client/src/containers/Topic/Topic/TopicData/TopicData.jsx#L384-L391))。
- Studio 自己的 DLQ 详情抽屉已展示同源存储元数据(`web/src/pages/instance/dlq.tsx` 详情列 `Queue`、`Offset`),消息页详情弹窗反而不展示。
## 2. Use case
运维排查消息问题时需要知道消息落在哪个 Broker 的哪个队列、物理偏移是多少,以便与队列浏览、位点重置、Broker 检查相互印证。当前 Studio 消息详情弹窗只显示 Message ID/Topic/Tag/Key/大小/双端 Host/存储时间,必须去其他页面对照才能定位。
## 3. Importance
后端已返回数据:`MessageRecordVO` 携带 `brokerName`/`queueId`/`queueOffset`(Apache provider 主查询路径逐消息填充;key 查询路径 brokerName 为 null),前端 TS 类型 `MessageRecord`(web/src/api/message.ts L9-L11)也声明了这三个字段,但 UI 从不渲染。属于数据已在手、仅缺展示面的低成本高价值补齐。
## 4. Expected behavior / acceptance criteria
- 消息详情弹窗(消息内容 Tab)的 Descriptions 中新增 `Broker`、`Queue ID`、`Queue Offset` 三项,取自所选消息记录。
- 字段为 null 时(如按 key 查询路径未知 broker)显示 `-` 占位,与既有空值语义一致。
- 队列号为 0 等 falsy 值必须正常渲染(用 `??` 而非 `||`)。
## 5. Related PR
Fix: #4267.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the MessageRecord type in web/src/api/message.ts and the message detail panel's Descriptions component. Add Broker, Queue ID, and Queue Offset using the selected message record, showing - for null values while preserving zero queue IDs; the message content tab should display all three fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100