RockteMQ-AI commented on issue #10874: URL: https://github.com/apache/rocketmq/issues/10874#issuecomment-5229879013
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** **Root Cause:** `MessageQueue.compareTo` compares queue IDs by subtraction (`this.queueId - other.queueId`). For extreme int values (e.g., `Integer.MIN_VALUE` and `Integer.MAX_VALUE`), the subtraction overflows and reverses the comparison sign, violating the `Comparable` contract. **Impact:** Client-side message queue ordering — sorting operations on message queues with extreme queue IDs may produce incorrect ordering, affecting load balancing and consumption. **Severity:** low (queue IDs are typically small positive values in practice, but the contract violation is real) --- *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]
