ShahOdin opened a new issue #6018: Consumer API: add acknowledge in batch
URL: https://github.com/apache/pulsar/issues/6018
 
 
   **I want to be able to process messages in batches and in parallel. One of 
the selling features of Pulsar for me, is being able to acknowledge messages 
separately which allows me to avoid re-processing messages if one message in a 
batch failed to be processed. However, I don't want to send acknowledgements 
for each. I'd like to wait on all tasks, see which ones succeeded and then 
acknowledge those in one commit. 
   
   **Describe the solution you'd like**
   Currently the Consumer Api has: `acknowledgeCumulative` which works the same 
way that Kafka's offsets work. but that doesn't work here. I'm suggesting the 
follwoing method: 
   
   `
   CompletableFuture<Void> acknowledgeInBatchAsync(List<MessageId> messageIds)
   `
   
   and the same for nacks. 
   
   **Describe alternatives you've considered**
   I think what I want can still be achieved by the following: Let's say I have 
messages with Ids (1,2,3,4,5) and (2,3,4,5) are processed successfully while 
(1) isn't. Please confirm if I can achieve what I want with the following: 
   
   ```
   acknowledgeCumulative(5)
   negativeAcknowledge(1)
   ```
   
   for some reason, I can't find the method `negativeAcknowledge` on the 
[consumer 
api](https://pulsar.apache.org/api/client/org/apache/pulsar/client/api/Consumer.html).
 
   

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