RockteMQ-AI commented on issue #1292:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/1292#issuecomment-5230087139

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** The `viewMessage` endpoint declares `topic` as optional 
(`@RequestParam(required = false)` in `MessageController.java`), but the 
provider implementation `MQAdminExtImpl.viewMessage(String topic, String 
msgId)` cannot resolve a message without it. It calls 
`getTopicClusterList(topic)` which requires a valid topic to determine cluster 
routing. When `topic` is null, the cluster lookup fails and the topic-less 
query cannot route to a broker. The method never falls back to the 
offsetId-based topic-less `viewMessage(msgId)` overload that 
`DefaultMQAdminExt` supports.
   
   **Impact:** Message-ID queries without a topic silently return an empty list 
instead of an actionable result, making the message lookup flow appear to work 
while dropping results.
   
   **Severity:** medium — A functional/UX gap, not a crash or security issue. 
Workaround exists (supply the topic).
   
   **Affected Files:**
   - `MessageController.java` (optional `topic` parameter)
   - `MessageServiceImpl.java` (`viewMessage` method)
   - `MQAdminExtImpl.java` (custom `viewMessage` that requires a topic)
   
   **Suggested Fix:** In `MQAdminExtImpl.viewMessage`, when `topic` is 
null/blank, fall back to the topic-less overload 
`MQAdminInstance.threadLocalMQAdminExt().viewMessage(msgId)`, which resolves 
the broker and physical offset directly from the offsetId encoded in the 
`msgId`.
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with 
PR generation.
   
   ---
   *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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to