merlimat commented on a change in pull request #7721:
URL: https://github.com/apache/pulsar/pull/7721#discussion_r464556092



##########
File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java
##########
@@ -108,6 +108,14 @@ public ContextImpl(InstanceConfig config, Logger logger, 
PulsarClient client,
 
         this.producerBuilder = (ProducerBuilderImpl<?>) 
client.newProducer().blockIfQueueFull(true).enableBatching(true)
                 .batchingMaxPublishDelay(1, TimeUnit.MILLISECONDS);
+        if (config.getFunctionDetails().getSink().getProducerSpec() != null) {
+            if 
(config.getFunctionDetails().getSink().getProducerSpec().getMaxPendingMessages()
 != 0) {

Review comment:
       Since the variable is `Integer`, shouldn't we check for `!= null` ?




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


Reply via email to