This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 212eb81  adding checkout for auto ack (#1775)
212eb81 is described below

commit 212eb8116287302a7fd4a7de6a2d71b0cda2c790
Author: Boyang Jerry Peng <[email protected]>
AuthorDate: Mon May 14 14:05:02 2018 -0700

    adding checkout for auto ack (#1775)
---
 .../org/apache/pulsar/functions/instance/JavaInstanceRunnable.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
 
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
index 4f66d41..4257053 100644
--- 
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
+++ 
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
@@ -305,8 +305,10 @@ public class JavaInstanceRunnable implements 
AutoCloseable, Runnable {
             if (result.getResult() != null) {
                 sendOutputMessage(srcRecord, result.getResult());
             } else {
-                // the function doesn't produce any result or the user doesn't 
want the result.
-                srcRecord.ack();
+                if (instanceConfig.getFunctionDetails().getAutoAck()) {
+                    // the function doesn't produce any result or the user 
doesn't want the result.
+                    srcRecord.ack();
+                }
             }
         }
     }

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to