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

[I] [Bug] Direct consumption rejects SDK-decoded messages with a producer unique ID [rocketmq-dashboard]

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

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

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


Re: [I] [Bug] Direct consumption rejects SDK-decoded messages with a producer unique ID [rocketmq-dashboard]

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

   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


Re: [I] [Bug] Direct consumption rejects SDK-decoded messages with a producer unique ID [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5199: [Bug] Direct consumption rejects SDK-decoded messages with a producer unique ID
URL: https://github.com/apache/rocketmq-dashboard/issues/5199


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