RockteMQ-AI commented on issue #11356:
URL: https://github.com/apache/rocketmq/issues/11356#issuecomment-6116988869

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase on the 
`develop` branch.
   
   **Root Cause:** `ProxyAdminGrpcService.selectQueue()` uses 
`Math.floorMod(shardingKey.hashCode(), queues.size())` to map a FIFO message 
group to a queue, while the gRPC data plane in `SendMessageActivity` (line 414) 
uses `Hashing.consistentHash(shardingKey.hashCode(), writeQueues.size())`. 
These two hash functions disagree for the same key and queue count, so an 
admin-sent FIFO message lands on a different queue than the one the data-plane 
producers use for the same message group.
   
   **Impact:** Per-group FIFO ordering is silently violated when messages are 
injected through the admin surface. A second consumer may pick up the admin 
message from a different queue. The RPC still returns OK, giving no indication 
of the split.
   
   **Severity:** Medium — affects FIFO ordering guarantees for admin-sent 
messages; data-plane-only FIFO flows are unaffected.
   
   **Suggested Fix:** Align `ProxyAdminGrpcService.selectQueue()` to use the 
same Guava `Hashing.consistentHash` path as `SendMessageActivity`, or extract a 
shared helper so both surfaces hash the sharding key identically.
   
   An automated fix proposal may be generated. Reply `/approve` to proceed with 
PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*


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