You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/08/02 02:32:57 UTC

[PR] fix(studio): make message provider fail explicitly instead of returning empty stub results [rocketmq-dashboard]

123123213weqw opened a new pull request, #751:
URL: https://github.com/apache/rocketmq-dashboard/pull/751

   Fixes #684
   
   ### Problem
   
   `MessageProviderStub` is wired as the production `MessageProvider`, but `queryMessages` returns an empty list and `getMessageTrace` returns an empty trace. A successful empty response can mislead operators into thinking no message or trace exists, when in fact no real provider is connected.
   
   ### Fix
   
   Until a real message provider is connected, both operations now fail explicitly with a structured `501 Not Implemented` `BusinessException` (mapped by `GlobalExceptionHandler` to a clean `Result.error(501, ...)`), matching the issue's expected behavior. Added `MessageProviderStubTest`.
   
   ### Verification
   
   `mvn test -Dtest=MessageProviderStubTest` on JDK 21: `Tests run: 2, Failures: 0, Errors: 0, Skipped: 0`.
   
   ### Diff
   
   2 files changed, +56 / -10.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(studio): make message provider fail explicitly instead of returning empty stub results [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #751: fix(studio): make message provider fail explicitly instead of returning empty stub results
URL: https://github.com/apache/rocketmq-dashboard/pull/751


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(studio): make message provider fail explicitly instead of returning empty stub results [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #751:
URL: https://github.com/apache/rocketmq-dashboard/pull/751#issuecomment-5161743363

   Thanks for the contribution. This is already covered by #685, merged into `rocketmq-studio` as 02e7bed: `MessageProviderStub.queryMessages` and `getMessageTrace` now both throw `BusinessException(501, ...)` instead of returning empty results, and `MessageProviderStubTest` asserts the 501 behaviour. #685 was opened first, so it was merged under first-come-first-served review order.
   
   Two details from your version were not carried over, and a small follow-up PR would be welcome if you think they are worth it: per-method messages (`Message query ...` vs `Message trace ...`) instead of one shared message, and the class-level Javadoc explaining why empty results are misleading. Please keep the `@Slf4j` warn logs, though — they are useful when diagnosing a deployment that still runs the stub.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org