pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rdhabalia commented on a change in pull request #2347: Fix: function with multi-topic not acking on effectively-once
Date Thu, 09 Aug 2018 06:34:28 GMT
rdhabalia commented on a change in pull request #2347: Fix: function with multi-topic not acking
on effectively-once
URL: https://github.com/apache/incubator-pulsar/pull/2347#discussion_r208819177
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/source/PulsarSource.java
 ##########
 @@ -142,8 +140,18 @@ public void open(Map<String, Object> config, SourceContext sourceContext)
throws
                 .message(message)
                 .topicName(topicName)
                 .ackFunction(() -> {
-                    if (pulsarSourceConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE)
{
-                        inputConsumer.acknowledgeCumulativeAsync(message);
+                    if (pulsarSourceConfig
+                            .getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE)
{
+                        // try to find actual consumer of the messageId
+                        if (inputConsumer instanceof MultiTopicsConsumerImpl) {
 
 Review comment:
   >  If so, should this be fixed in MultiTopicsConsumerImpl instead?
   
   Yeah, earlier I was thinking about ordering but MultiConsumer anyway doesn't maintain ordering
among the consumers and we can also do cumulative ack for individual consumer. let me fix
it. 

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


With regards,
Apache Git Services

Mime
View raw message