From 30ad172331a56b67a33b9ee466e300d2acd0586b Mon Sep 17 00:00:00 2001 From: xujianhai666 <52450794+xujianhai666@users.noreply.github.com> Date: Mon, 30 Mar 2020 16:44:58 +0800 Subject: [PATCH] [ISSUE #1741] Rename takeMessags to takeMessages Closes #1741 --- .../impl/consumer/ConsumeMessageOrderlyService.java | 2 +- .../rocketmq/client/impl/consumer/ProcessQueue.java | 2 +- .../client/impl/consumer/ProcessQueueTest.java | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) 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 e440bd98..f65567b6 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 092da9aa..f659bd3f 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 d6a6dcf7..16e4a0d9 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); -- GitLab