From 3cc7f095cea6583784193284e5531757839b2171 Mon Sep 17 00:00:00 2001 From: qsrg <42698388+qsrg@users.noreply.github.com> Date: Fri, 4 Dec 2020 15:01:02 +0800 Subject: [PATCH] [ISSUE #2477] Fix allocate algorithm in AllocateMessageQueueByMachineRoom --- .../consumer/rebalance/AllocateMessageQueueByMachineRoom.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByMachineRoom.java b/client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByMachineRoom.java index 37568317..31f4e352 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByMachineRoom.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByMachineRoom.java @@ -49,7 +49,7 @@ public class AllocateMessageQueueByMachineRoom implements AllocateMessageQueueSt int startIndex = mod * currentIndex; int endIndex = startIndex + mod; for (int i = startIndex; i < endIndex; i++) { - result.add(mqAll.get(i)); + result.add(premqAll.get(i)); } if (rem > currentIndex) { result.add(premqAll.get(currentIndex + mod * cidAll.size())); -- GitLab