zmuxuny opened a new issue, #6031:
URL: https://github.com/apache/rocketmq-dashboard/issues/6031

   ### 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
   
   rocketmq-studio at 4ee173ad71ae777f01111394a88358958b9abad6, unchanged 
production source.
   
   ### Runtime Environment
   
   Linux; Temurin JDK 21.0.12.1, Maven 3.9.11. Mocked network I/O with real 
RocketMQ 5.5.0 encoding/client decoding. No live broker or MySQL used; no E2E 
result claimed.
   
   ### Connected RocketMQ Cluster
   
   No live cluster. Apache provider classic NameServer/Broker path using 
RocketMQ 5.5.0 client libraries and synthetic unit-test topology.
   
   ### Build Toolchain
   
   _No response_
   
   ### Describe the Bug
   
   ## Tracking continuation (2026-10-10)
   
   This replaces #5199, which was automatically closed by github-actions[bot] 
for inactivity on 2026-10-08. The issue's technical/design scope is preserved. 
Its current discussion and related issue/PR searches were rechecked before 
creating this continuation; no existing replacement issue was found.
   
   Existing fix PR #5202 remains open and ready for review. This replacement 
restores issue tracking for that PR without creating another implementation.
   
   The original report below retains its stated baseline and historical 
verification. It does not claim fresh test results, fully green CI, or new 
maintainer approval. Discussion and prior evidence remain available in #5199.
   
   RocketMQMessageProvider.consumeMessageDirectly validates the resolved 
message.getMsgId() as a physical offset ID and passes that value to direct 
consumption. The SDK viewMessage path uses MessageDecoder.clientDecode, 
returning MessageClientExt: getMsgId() returns producer UNIQ_KEY when present, 
while getOffsetMsgId() retains the physical broker location. Consequently a 
valid physical-ID request can pass the initial topology guard and resolve the 
correct message, then incorrectly fail the second guard with409.
   
   ### Steps to Reproduce
   
   1. Create a synthetic broker message with store host and commit-log offset 
matching a mocked owned-cluster topology, and a producer UNIQ_KEY distinct from 
the physical offset ID.
   2. Encode with MessageDecoder.encode and decode with 
MessageDecoder.clientDecode. Assert MessageClientExt contains distinct logical 
and physical IDs.
   3. Mock viewMessage to return that decoded message. Invoke the actual 
provider direct-consume method with the valid physical offset ID and owned 
topic/consumer.
   4. Expect CR_SUCCESS and physical-ID dispatch. Unchanged production instead 
throws BusinessException: Message ID does not belong to a target cluster 
master, at RocketMQMessageProvider.java:570.
   
   ### What Did You Expect to See?
   
   Use MessageClientExt.getOffsetMsgId() for physical-location validation and 
direct-consume dispatch. Preserve plain MessageExt behavior and every existing 
request-ID, resource ownership, route, actual-topic and store-host guard.
   
   ### What Did You See Instead?
   
   The real-SDK decoding regression 
directlyConsumesClientDecodedMessageByItsPhysicalOffsetIdTest fails with409 
before direct-consume RPC on unchanged production. The initial isolated run:1 
test,0 assertion failures,1 error. Checkstyle0. Producer logical ID is being 
treated as physical storage location.
   
   ### Additional Context
   
   Official source evidence:
   
https://github.com/apache/rocketmq-dashboard/blob/4ee173ad71ae777f01111394a88358958b9abad6/server/src/main/java/org/apache/rocketmq/studio/provider/apache/RocketMQMessageProvider.java#L564-L579
   
https://github.com/apache/rocketmq/blob/rocketmq-all-5.5.0/common/src/main/java/org/apache/rocketmq/common/message/MessageClientExt.java#L19-L41
   
https://github.com/apache/rocketmq/blob/rocketmq-all-5.5.0/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java#L1322-L1332
   
   All-state searches included MessageClientExt, UNIQ_KEY, 
consumeMessageDirectly, direct consume and offset direct. Related#5006 
introduced guards,#4605 concerns offline-client grading,#4683 concerns hostname 
matching; none correct this logical/physical-ID confusion.
   
   AI assistance used. Regression executed before production edits. Proposed 
narrow internal correction, with all guards retained; no new API, dependency, 
schema or UI text.
   
   ### 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]

Reply via email to