<@U078Y59KC3B> if I use batching without index ack...
# ask-ai
s
@RunLLM if I use batching without index acknowledgement, is it possible to use redelivery for a specific message? Or will all the messages in the batch be redelivered?
r
If you use batching without batch index acknowledgment enabled, redelivery will resend all messages in the batch, not just the specific message. This is because, by default, Pulsar tracks and acknowledges batches as single units, so any negative acknowledgment or timeout on one message causes the entire batch to be redelivered. To redeliver only specific messages within a batch, you must enable batch index acknowledgment on both the broker and the consumer sides; otherwise, acknowledged messages in the batch may be redelivered as well (Pulsar docs: batching, Pulsar docs: negative acknowledgment). Would you like more detail on how to enable batch index acknowledgment or how redelivery works with batching? Sources: - Pulsar docs: batching - Pulsar docs: negative acknowledgment 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM if I use batching without index acknowledgement, is it possible to use
reconsumeLater
for a specific message? Or will all the messages in the batch be reconsumed?
r
If batching is enabled and batch index acknowledgment is not enabled, using
reconsumeLater
(or negative acknowledgment) on a specific message will cause all messages in the batch to be reconsumed, not just the targeted message. This is because, without batch index acknowledgment, Pulsar treats the batch as a single unit for redelivery and acknowledgment (Pulsar docs: batching, Pulsar docs: negative acknowledgment). Would you like more detail on enabling batch index acknowledgment or the behavior of
reconsumeLater
with batching? Sources: - Pulsar docs: batching - Pulsar docs: negative acknowledgment 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.