You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/07 14:24:04 UTC

[GitHub] [pulsar] hangc0276 commented on a change in pull request #6862: fix consumer stuck when batchReceivePolicy maxNumMessages > maxReceiverQueueSize

hangc0276 commented on a change in pull request #6862:
URL: https://github.com/apache/pulsar/pull/6862#discussion_r421544869



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
##########
@@ -95,7 +95,16 @@ protected ConsumerBase(PulsarClientImpl client, String topic, ConsumerConfigurat
         this.schema = schema;
         this.interceptors = interceptors;
         if (conf.getBatchReceivePolicy() != null) {
-            this.batchReceivePolicy = conf.getBatchReceivePolicy();
+            if (conf.getBatchReceivePolicy().getMaxNumMessages() > this.maxReceiverQueueSize) {

Review comment:
       Thanks for your feedback, I have add the unit tests for all kinds of exception case, please take a look.




----------------------------------------------------------------
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.

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