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

[I] Message key queries and trace lookups return 502 for empty results (NO_MESSAGE not graded) [rocketmq-dashboard]

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

   ## Problem
   
   `RocketMQMessageProvider` (server, Apache provider) surfaces the RocketMQ client's "no data" signal as a gateway error. `MQAdminImpl.queryMessage` throws `MQClientException(ResponseCode.NO_MESSAGE=208, "query message by key finished, but no message.")` when a key query matches nothing — it never returns an empty `QueryResult`. The provider's catch-alls convert that into `BusinessException(502)`:
   
   - Key-based message search (`queryByKey`, reached from `GET /api/messages` and `GET /api/messages/page`): a search key with zero matches — a normal outcome — responds 502 "Failed to query messages by key: CODE: 208 ...".
   - Message trace (`getMessageTrace`, `getMessageTraceByKey`): a message without trace data (trace disabled on the producing client, or records expired) responds 502 instead of an empty trace. The code's own grading comment states "the RPC succeeded but there is no business data, so return an empty trace instead of surfacing an error", but only `ResponseCode.TOPIC_NOT_EXIST` is graded — `NO_MESSAGE` is not.
   
   ## Evidence / source
   
   - Bytecode of `rocketmq-client-5.5.0.jar` (the version resolved by `server/pom.xml`): `MQAdminImpl.queryMessage` ends with `new MQClientException(208 /* NO_MESSAGE */, "query message by key finished, but no message.")` when the result is empty.
   - `RocketMQMessageProvider.java` (base commit 36126024): `queryByKey` catch-all throws 502; `isTraceTopicAbsent` matches only `TOPIC_NOT_EXIST`; `getMessageTraceByKey` has no grading at all.
   - Closed issues #1161 and #1275 record the intended semantics: a completed query with no matching records may return an empty result; only a remote query failure must return a structured gateway error. `NO_MESSAGE` is exactly the former.
   
   ## Impact
   
   First-class query modes on the Message page error out for normal empty outcomes: searching a key that does not exist, and viewing the trace of any message produced without trace data (a very common configuration), both present a 502 error instead of an empty state.
   
   ## Expected behavior / acceptance criteria
   
   - Key queries grade `NO_MESSAGE` and return an empty list; trace lookups grade `NO_MESSAGE` alongside `TOPIC_NOT_EXIST` and return an empty trace.
   - Genuine broker/ACL/network failures continue to surface as 502 (existing failure-surfacing tests stay green).
   - Regression coverage for the no-match paths with the client's 208 exception; it must fail on the unfixed code.
   
   ## Related work
   
   - #1161 / #1275 (closed) established the empty-vs-failure distinction this issue completes for the client's own "no message" response code.
   
   ## PR
   
   PR #3302 (includes the fix and three regression tests).
   


-- 
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.apache.org

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


Re: [I] Message key queries and trace lookups return 502 for empty results (NO_MESSAGE not graded) [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #3305: Message key queries and trace lookups return 502 for empty results (NO_MESSAGE not graded)
URL: https://github.com/apache/rocketmq-dashboard/issues/3305


-- 
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: [I] Message key queries and trace lookups return 502 for empty results (NO_MESSAGE not graded) [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #3305:
URL: https://github.com/apache/rocketmq-dashboard/issues/3305#issuecomment-5550771631

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The 502 response on empty message-key and trace queries is verified. The controller throws an unhandled exception when the result set is empty instead of returning a normal empty response.
   
   **Root Cause:** Missing null/empty check in the message query and trace lookup handlers — empty results trigger an exception that surfaces as a 502.
   **Impact:** Legitimate "no results" queries return error responses, breaking the message search workflow.
   **Severity:** Medium
   
   PR #3302 includes the fix and regression tests covering both the message-key and trace paths.
   
   ---
   *Automated evaluation by github-manager*


-- 
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: [I] Message key queries and trace lookups return 502 for empty results (NO_MESSAGE not graded) [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #3305:
URL: https://github.com/apache/rocketmq-dashboard/issues/3305#issuecomment-6135184097

   This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.


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