This is an automated email from the ASF dual-hosted git repository.

duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1c02afd  fix(litePullConsumer):delete invalid method to get next 
pullBatchSize (#1702)
1c02afd is described below

commit 1c02afd1eaccfc48e0286da20311eceb9c8767fe
Author: rongtong <[email protected]>
AuthorDate: Tue Jan 7 20:05:49 2020 +0800

    fix(litePullConsumer):delete invalid method to get next pullBatchSize 
(#1702)
---
 .../rocketmq/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 cd4d4cf..c3eb7fb 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:

Reply via email to