sijie commented on a change in pull request #4768: Expose acknowledgment 
flushing capabilities at the consumer level
URL: https://github.com/apache/pulsar/pull/4768#discussion_r305603319
 
 

 ##########
 File path: 
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/Consumer.java
 ##########
 @@ -255,6 +255,13 @@
      * @return a future that can be used to track the completion of the 
operation
      */
     CompletableFuture<Void> acknowledgeCumulativeAsync(MessageId messageId);
+    
+    /**
+     * Flush all batched acknowledgements and wait until all acknowledgments 
have been persisted.
+     * 
+     * Flush acks returns immediately if batching of acks is disabled.
+     */
+    void flushAcknowledgements();
 
 Review comment:
   in Consumer api, we have both sync and async api. so I think it would be 
good to add flushAsync in acknowledgmentsGroupingTracker, convert `flush` to 
use `flushAsync, and then expose flushAsync as flushAcknowledgementsAsync() and 
expose flush as flushAcknowledgments

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to