RockteMQ-AI commented on issue #1440: URL: https://github.com/apache/rocketmq-clients/issues/1440#issuecomment-6314457887
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase (master `a3d1de8`). **Root Cause:** `select_message_queue()` at `rust/src/util.rs:43-46` does a plain round-robin (`route.index.fetch_add(1)`) over all queues with no filtering for readable permission or master broker status. Additionally, `route.index` starts at 0 (set in `TopicRouteManager::new`), so every consumer instance and restart begins with the same queue. **Impact:** 1. Receive requests are sent to write-only, `NONE`-permission, or slave queues, wasting calls and potentially returning errors. 2. All consumer instances concentrate load on the first queues, especially short-lived consumers. **Severity:** medium — degraded load distribution and wasted receive calls; no data loss but reduced throughput during scaling operations or broker failures. **Java parity:** Java `SubscriptionLoadBalancer` filters for `READ`/`READ_WRITE` queues on master brokers (`broker.id == 0`) and starts at a random index. An automated fix proposal may be generated. Reply `/approve` to proceed with PR generation, `/revise` to request changes, or `/reject` to dismiss. --- *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]
