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

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase on the 
`rocketmq-studio` branch.
   
   **Root Cause:** 
   `MessageQueryToolHandler.java:48` and `MessageTraceToolHandler.java:47` read 
the `cluster` input field but assign it to `instanceId`, which is then passed 
to `RuntimeAdminClientResolver.resolveInstance()` → 
`instanceRepository.findByIdentifier()`. The resolver expects an instance 
identifier (unique instance name or numeric ID), but receives a cluster ID 
instead, causing the 404 error.
   
   **Impact:** 
   Both `rmq.message.query` and `rmq.message.trace` tools are completely 
unusable from the manual tool dialog and AI chat interface. Every invocation 
fails with a misleading "Instance not found" error that names the cluster ID.
   
   **Severity:** High — core message query and trace functionality is broken 
for all Studio users.
   
   **Verification:**
   - Confirmed the code pattern at the specified file:line locations
   - Verified `RuntimeAdminClientResolver.java:35` uses `findByIdentifier()` 
which requires instance identifiers
   - The issue correctly references commit 206314b9 (#4115) which fixed the 
same pattern for other tools
   
   **Recommended Fix Direction:**
   Option 1 (preferred): Rename the input field from `cluster` to `instance` in 
both handlers and update the frontend tool dialog to populate it with instance 
identifiers instead of cluster IDs.
   
   Option 2: Keep the `cluster` field name but add a resolution layer that maps 
cluster IDs to instance identifiers before calling the resolver.
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with 
PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


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