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/04 02:05:17 UTC

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

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



##########
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:
       We are checking for null in getProducerSpec.
   The getFunctionDetails is a protobuf and the variable that it returns is an integer. So null checking is not needed




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