-
Notifications
You must be signed in to change notification settings - Fork 141
Description
As documented here:
To avoid redelivering acknowledged messages in a batch to the consumer, Pulsar introduces batch index acknowledgment since Pulsar 2.6.0. When batch index acknowledgment is enabled, the consumer filters out the batch index that has been acknowledged and sends the batch index acknowledgment request to the broker. The broker maintains the batch index acknowledgment status and tracks the acknowledgment status of each batch index to avoid dispatching acknowledged messages to the consumer. The batch is deleted when all indices of the messages in it are acknowledged.
By default, batch index acknowledgment is disabled (acknowledgmentAtBatchIndexLevelEnabled=false). You can enable batch index acknowledgment by setting the acknowledgmentAtBatchIndexLevelEnabled parameter to true at the broker side. Enabling batch index acknowledgment results in more memory overheads.
Batch index acknowledgment must also be enabled in the consumer by calling .enableBatchIndexAcknowledgment(true);
Reviewing the ack code I can not find any support for batch index acks based on my non-expert review of the code in question.
It would be awesome of this API was exposed and we could ack/nack individual elements in a batch.