You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "miles-ton (via GitHub)" <gi...@apache.org> on 2023/03/24 17:45:02 UTC

[GitHub] [rocketmq] miles-ton commented on a diff in pull request #6417: [ISSUE #6205] Support Async pull for DefaultLitePullConsumer

miles-ton commented on code in PR #6417:
URL: https://github.com/apache/rocketmq/pull/6417#discussion_r1147889798


##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:
##########
@@ -1065,6 +1110,72 @@ private PullResult pullSyncImpl(MessageQueue mq, SubscriptionData subscriptionDa
         return pullResult;
     }
 
+    private void pull(MessageQueue mq, SubscriptionData subscriptionData, long offset, int maxNums, PullCallback pullCallback)
+        throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
+        this.pull(mq, subscriptionData, offset, maxNums, this.defaultLitePullConsumer.getConsumerPullTimeoutMillis(), pullCallback);
+    }
+
+    private void pull(MessageQueue mq, SubscriptionData subscriptionData, long offset, int maxNums, long timeout,
+        PullCallback pullCallback)
+        throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
+        this.pullAsyncImpl(mq, subscriptionData, offset, maxNums, true, timeout, pullCallback);
+    }
+
+    private void pullAsyncImpl(MessageQueue mq, SubscriptionData subscriptionData, long offset, int maxNums,

Review Comment:
   is it possible to extract the same code as existed method pullSyncImpl()



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org