diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java index e440bd98a9c97dfe91063c37ef6fe626b4a4e656..f65567b685d723a5b65b465f0a93c363c985d450 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java @@ -452,7 +452,7 @@ public class ConsumeMessageOrderlyService implements ConsumeMessageService { final int consumeBatchSize = ConsumeMessageOrderlyService.this.defaultMQPushConsumer.getConsumeMessageBatchMaxSize(); - List msgs = this.processQueue.takeMessags(consumeBatchSize); + List msgs = this.processQueue.takeMessages(consumeBatchSize); defaultMQPushConsumerImpl.resetRetryAndNamespace(msgs, defaultMQPushConsumer.getConsumerGroup()); if (!msgs.isEmpty()) { final ConsumeOrderlyContext context = new ConsumeOrderlyContext(this.messageQueue); diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java index 092da9aa33e1997639ed311e822397bec7c1d053..f659bd3f83100c5a1837f4ecadc7bbfdee9f63aa 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java @@ -296,7 +296,7 @@ public class ProcessQueue { } } - public List takeMessags(final int batchSize) { + public List takeMessages(final int batchSize) { List result = new ArrayList(batchSize); final long now = System.currentTimeMillis(); try { diff --git a/client/src/test/java/org/apache/rocketmq/client/impl/consumer/ProcessQueueTest.java b/client/src/test/java/org/apache/rocketmq/client/impl/consumer/ProcessQueueTest.java index d6a6dcf72f65a5dd476d53359d0b35feb1bc74c1..16e4a0d901b856d1e2e8dd195850c74adc1e86a0 100644 --- a/client/src/test/java/org/apache/rocketmq/client/impl/consumer/ProcessQueueTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/impl/consumer/ProcessQueueTest.java @@ -38,7 +38,7 @@ public class ProcessQueueTest { assertThat(pq.getMsgCount().get()).isEqualTo(100); - pq.takeMessags(10); + pq.takeMessages(10); pq.commit(); assertThat(pq.getMsgCount().get()).isEqualTo(90); @@ -55,7 +55,7 @@ public class ProcessQueueTest { assertThat(pq.getMsgSize().get()).isEqualTo(100 * 123); - pq.takeMessags(10); + pq.takeMessages(10); pq.commit(); assertThat(pq.getMsgSize().get()).isEqualTo(90 * 123); @@ -74,17 +74,17 @@ public class ProcessQueueTest { assertThat(processQueueInfo.getCachedMsgSizeInMiB()).isEqualTo(12); - pq.takeMessags(10000); + pq.takeMessages(10000); pq.commit(); pq.fillProcessQueueInfo(processQueueInfo); assertThat(processQueueInfo.getCachedMsgSizeInMiB()).isEqualTo(10); - pq.takeMessags(10000); + pq.takeMessages(10000); pq.commit(); pq.fillProcessQueueInfo(processQueueInfo); assertThat(processQueueInfo.getCachedMsgSizeInMiB()).isEqualTo(9); - pq.takeMessags(80000); + pq.takeMessages(80000); pq.commit(); pq.fillProcessQueueInfo(processQueueInfo); assertThat(processQueueInfo.getCachedMsgSizeInMiB()).isEqualTo(0);