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/08/03 17:29:24 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #7721: Added ability to specify producer config for functions and sources

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:
users@infra.apache.org