gaoran10 commented on code in PR #357:
URL: 
https://github.com/apache/pulsar-client-node/pull/357#discussion_r1440406893


##########
src/ConsumerConfig.cc:
##########
@@ -265,6 +291,39 @@ ConsumerConfig::ConsumerConfig(const Napi::Object 
&consumerConfig, pulsar_messag
     }
     pulsar_consumer_configuration_set_dlq_policy(this->cConsumerConfig.get(), 
&dlq_policy);
   }
+
+  if (consumerConfig.Has(CFG_BATCH_RECEIVE_POLICY) &&
+      consumerConfig.Get(CFG_BATCH_RECEIVE_POLICY).IsObject()) {
+    Napi::Object propObj = 
consumerConfig.Get(CFG_BATCH_RECEIVE_POLICY).ToObject();
+    int maxNumMessages = -1;
+    if (propObj.Has(CFG_BATCH_RECEIVE_POLICY_MAX_NUM_MESSAGES) &&

Review Comment:
   I found Java client will use the `receiverQueueSize` if `maxNumMessages` is 
bigger than the `receiverQueueSize`, I'm not sure whether we can add this check 
in the node client. refer to 
[here](https://github.com/apache/pulsar/blob/v3.1.2/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java#L148C49-L148C49)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to