unbridled-41 opened a new issue, #5460:
URL: https://github.com/apache/rocketmq-dashboard/issues/5460

   ### Studio Version
   branch: `rocketmq-studio` @ `6a68042f` (the revision verified; the branch is 
based on it)
   deployed as: built from source (unit test)
   
   ### Runtime Environment
   
   Not environment-specific: the failure is in the workbook writer 
(EasyExcel/POI).
   
   ### Connected RocketMQ Cluster
   
   An Apache instance with at least one dead-letter message whose decoded body 
exceeds 32767 characters.
   
   ### Describe the Bug
   
   `GET /api/dlq/export-excel` fails with HTTP 502 for the whole group when a 
single dead-letter message has a decoded body longer than the spreadsheet cell 
limit:
   
   - `instance/dlq/DLQMessageExcelRow.java` copies the full body into the 
`Body` cell; `provider/apache/RocketMQDLQProvider.java` puts the whole decoded 
body into the VO and wraps any write failure as `throw new 
BusinessException(502, "Failed to export DLQ messages as Excel: ...")`.
   - POI rejects cell text beyond `SpreadsheetVersion.getMaxTextLength()`; the 
observed message is `The maximum length of cell contents (text) is 32767 
characters`.
   
   ### Steps to Reproduce
   
   1. Produce (or select) a dead-letter message with a body longer than 32767 
characters.
   2. Call `GET /api/dlq/export-excel` for that group.
   3. Observe the 502 and the POI message above, and that no workbook is 
produced.
   
   ### What Did You Expect to See?
   
   A workbook containing every selected message, with oversized bodies bounded 
in the cell that cannot hold them.
   
   ### What Did You See Instead?
   
   The export fails for the entire group, and the operator cannot tell which 
message caused it.
   
   ### Evidence
   
   - `instance/dlq/DLQMessageExcelRow.java` (`from`), 
`provider/apache/RocketMQDLQProvider.java` (`exportExcel`).
   - `cd server && mvn -o test -Dtest=RocketMQDLQProviderTest` — the added case 
`exportExcelTruncatesOversizedBodiesInsteadOfFailingTheWholeExport` errors 
before the change with `BusinessException: Failed to export DLQ messages as 
Excel: The maximum length of cell contents (text) is 32767 characters` and 
passes after (`Tests run: 46`), asserting the clamped cell and that the 
following row still exports intact.
   
   ### Impact
   
   One unlucky dead letter makes a whole group's export unusable.
   
   ### Acceptance Criteria
   
   - The body cell is bounded to the spreadsheet limit with a visible marker, 
without splitting a surrogate pair.
   - A regression test drives a real workbook read-back.
   
   **Corresponding PR:** #5424
   


-- 
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]

Reply via email to