sijie commented on a change in pull request #1621:  refactoring java instance 
to use pull model for message ingress
URL: https://github.com/apache/incubator-pulsar/pull/1621#discussion_r182976385
 
 

 ##########
 File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
 ##########
 @@ -305,15 +288,15 @@ private void setupStateTable() throws Exception {
 
     private void processResult(InputMessage msg,
                                JavaExecutionResult result,
-                               long startTime, long endTime) {
+                               long startTime, long endTime) throws Exception {
         if (result.getUserException() != null) {
             log.info("Encountered user exception when processing message {}", 
msg, result.getUserException());
             stats.incrementUserExceptions(result.getUserException());
-            processor.handleProcessException(msg, result.getUserException());
+            throw result.getUserException();
 
 Review comment:
   @srkukarni - so your question was "can we avoid fail-fast for at-most-once 
and at-least-once". however the problem is we can ignore exceptions for pulsar 
source, pulsar can redeliver the messages. However not every sources are 
designed to handle redelivering, if we do so, it might makes source abstraction 
very complicated. as the starting point, I would suggest fail-fast and we do 
enhancement later after we are done with the abstraction and make connect run 
with functions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to