Skip to content

[Studio] feat(web): DLQ message details, selected resend and Excel export - #2513

Open
zhaohai666 wants to merge 1 commit into
apache:rocketmq-studiofrom
zhaohai666:feature/studio-dlq-detail
Open

[Studio] feat(web): DLQ message details, selected resend and Excel export#2513
zhaohai666 wants to merge 1 commit into
apache:rocketmq-studiofrom
zhaohai666:feature/studio-dlq-detail

Conversation

@zhaohai666

Copy link
Copy Markdown

[Web] DLQ message details, selected re-send and Excel export

Summary

The studio DLQ page only offered group-level statistics, a time-window bulk re-delivery action and a
JSON export. Compared with the classic dashboard it was missing the two most-used operations:
browsing the individual dead-letter messages of a group, and re-sending a single / selected
batch
of them. The JSON export also did not match the expected Excel format. This PR closes that gap.

Changes

Backend

  • DLQProvider (interface) and DLQProviderStub: three new operations —
    listMessages (paged details), resendMessages by msgId list, and exportExcel.
  • RocketMQDLQProvider:
    • listMessages scans the %DLQ%<group> topic with a pull consumer within the requested window
      and returns a PageResult<DLQMessageVO> (msgId, topic, queueId, offset, storeTime, keys, body).
    • resendMessages(msgIds, targetTopic) scans the DLQ topic, filters the selected messages by
      msgId and re-sends each to its origin topic (or an explicit target) with a short-lived producer,
      reusing the existing resendOne logic (including origin-topic property fallback).
    • exportExcel streams the same scan into a real .xlsx workbook.
  • DLQController: three new endpoints —
    • GET /api/dlq/{groupName}/messages (paged details),
    • POST /api/dlq/resend-selected (by msgId list, optional targetTopic),
    • GET /api/dlq/export-excel (single message ids or the whole window, returns .xlsx).
  • DLQService: validation + Apache-only guard (cloud instances keep 501), plus
    resendSelectedMessages and exportExcel delegation.
  • New DLQMessageExcelRow (EasyExcel row model with formatted store time) and
    DLQResendSelectedRequestDTO.
  • server/pom.xml: adds com.alibaba:easyexcel:2.2.10 for .xlsx generation.

Frontend

  • api/message.ts: DLQMessage / DLQMessagePage types and listDLQMessages,
    resendDLQSelected, exportDLQExcel API functions.
  • services/messageService.ts: service wrappers (with mock fallbacks).
  • pages/instance/dlq.tsx:
    • The old "查看详情" stats dialog is replaced by a message detail drawer: paged table of
      dead-letter messages, row selection, single / batch re-send, and Excel export of the selection
      or the whole window.
    • The row-level "导出" action now downloads .xlsx instead of .json.

Tests

  • RocketMQDLQProviderTest / DLQServiceTest / DLQControllerTest / DLQProviderStubTest:
    49 tests green, covering the new endpoints, paged detail validation and provider delegation.
  • DLQPage.test.tsx: updated the detail-dialog case to assert the new drawer (including the
    listDLQMessages call) and the Excel export path (.xlsx download via the shared download util).

Validation

  • Frontend: tsc -b clean; DLQPage.test.tsx (14) green.
  • Backend: mvn -o checkstyle:check test -Dtest="RocketMQDLQProviderTest,DLQServiceTest,DLQControllerTest,DLQProviderStubTest"
    49 tests green.

Notes

  • The existing time-window bulk re-send and group-level CSV export are kept unchanged.
  • Cloud instances still return 501 for DLQ detail / resend / Excel operations
    (requireApacheInstance guard), consistent with the rest of the DLQ feature.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — comprehensive feature that adds DLQ message listing, selective resend, and Excel export. The backend correctly uses EasyExcel for streaming export, and the frontend provides a clear UI with pagination and batch operations.

Good design: the resend-selected endpoint accepts specific message IDs instead of re-querying, and the Excel export supports both full export and filtered export by message IDs. Mock mode support is consistent with other features.


Automated review by github-manager-bot

@RockteMQ-AI

Copy link
Copy Markdown

⚠️ 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:

git fetch origin
git checkout feature/studio-dlq-detail
git rebase origin/rocketmq-studio
# 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

- DLQProvider: add listMessages (paged details), resendMessages by msgId
  and exportExcel; Apache impl scans %DLQ%group via pull consumer and
  re-delivers selected dead letters to their origin/target topic
- DLQController: GET /api/dlq/{group}/messages (paged detail),
  POST /api/dlq/resend-selected (by msgId), GET /api/dlq/export-excel
  (single or batch); Excel via EasyExcel 2.2.10 (xlsx)
- dlq page: replace the group-stats dialog with a message detail drawer
  (paged table, row selection, single/batch resend, Excel export); row
  export now downloads .xlsx instead of .json
@zhaohai666
zhaohai666 force-pushed the feature/studio-dlq-detail branch from 064c9b6 to f3b8da7 Compare August 24, 2026 02:47

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — re-approving after rebase. DLQ message details, selected resend and Excel export are well-structured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants