Frun1na opened a new issue, #4608: URL: https://github.com/apache/rocketmq-dashboard/issues/4608
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below. ### Studio Version branch: master git commit id: d50ffecc9d7e8f8f46da64198831bd7952e6974e deployed as: built from source (`cd server && mvn -B -ntp package -DskipTests`) ### Runtime Environment OS: Windows 11 with WSL2 (Ubuntu 24.04.3 LTS) MySQL: not involved in this server-side issue browser: not involved ### Connected RocketMQ Cluster RocketMQ 4.x / 5.x cluster registered in Studio access mode: any instance; verified by code inspection and unit tests with mocked providers, no specific cluster deployment required ### Build Toolchain JDK 21, Maven 3.9.9 ### Describe the Bug `MessageService.consumeMessageDirectly` always audits the operation as `SUCCESS`: the result string is hardcoded in the `operationAuditService.record(...)` call, while `consumeResult` is the broker-side CMResult enum name — a failed consume reports `CR_ROLLBACK` / `CR_LATER` / `CR_RETURN_NULL` / `CR_EXCEPTION`, yet the operation audit timeline (the #4191 feature) shows `SUCCESS`. Additionally, when the provider throws (for example, the target client is offline), no audit record is written at all, so the failed attempt never appears in the timeline. ### Steps to Reproduce 1. Run a direct consume that ends with a non-`CR_SUCCESS` broker result (or point the request at an offline client so the provider throws). 2. Open the operation audit timeline and look up the `DIRECT_CONSUME_MESSAGE` entry. ### What Did You Expect to See? The audit result reflects the actual outcome: `SUCCESS` only when `consumeResult` is `CR_SUCCESS`; `FAILED` with the error message when the consume failed or the call threw, consistent with the FAILED convention already used by e.g. `RocketMQAdminClientImpl`. ### What Did You See Instead? `SUCCESS` regardless of the consume result; no record at all on the exception path. ### Additional Context I have a fix ready and will reference the pull request here. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
