From 1c02afd1eaccfc48e0286da20311eceb9c8767fe Mon Sep 17 00:00:00 2001 From: rongtong Date: Tue, 7 Jan 2020 20:05:49 +0800 Subject: [PATCH] fix(litePullConsumer):delete invalid method to get next pullBatchSize (#1702) --- .../client/impl/consumer/DefaultLitePullConsumerImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java index cd4d4cfc..c3eb7fb1 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java @@ -211,10 +211,6 @@ public class DefaultLitePullConsumerImpl implements MQConsumerInner { } } - private int nextPullBatchSize() { - return Math.min(this.defaultLitePullConsumer.getPullBatchSize(), consumeRequestCache.remainingCapacity()); - } - public synchronized void shutdown() { switch (this.serviceState) { case CREATE_JUST: @@ -775,7 +771,8 @@ public class DefaultLitePullConsumerImpl implements MQConsumerInner { subscriptionData = FilterAPI.buildSubscriptionData(defaultLitePullConsumer.getConsumerGroup(), topic, SubscriptionData.SUB_ALL); } - PullResult pullResult = pull(messageQueue, subscriptionData, offset, nextPullBatchSize()); + + PullResult pullResult = pull(messageQueue, subscriptionData, offset, defaultLitePullConsumer.getPullBatchSize()); switch (pullResult.getPullStatus()) { case FOUND: -- GitLab