You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the messages in a topic are batched, cumulative acknowledgments do not acknowledge messages as expected. Two behaviors arise when acknowledging a message in the middle of a batch:
A cumulative acknowledgment for the current message is not sent, instead, an individual acknowledgment for the previous message in the batch is sent.
If the consumer disconnects and reconnects at this point, the cursor picks up at the next batch instead of at the last acked message.
To Reproduce
Steps to reproduce the behavior:
Add messages to a topic with batching enabled
Create a consumer on the topic with ackGroupTime set to 0.
When a message is received, expose the underlying BatchMessageIdImpl on the MessageId to know where the message is in a batch.
If the message is in the middle of a batch, call a cumulative ack on it, then on return close the consumer and restart it on the same subscription.
Expected behavior
The pulsar consumer should send a cumulative acknowledgement for the correct message id. On disconnect, when a cumulative acknowledgment has been sent for a message in the middle of a batch, the consumer should start receiving messages from that point, not from the next batch.
Desktop (please complete the following information):
OS: linux
The text was updated successfully, but these errors were encountered:
I want to add a similar behaviour:
Let's say we have 10 messages in a batch sent by some producer, also we have MaxRedeliverCount is 1. Consumer acked 9 messages and 1 nacked. Current behaviour
All 10 messages will be redelivered which will lead to double processing of 9 messages. Expected behavior
Only 1 message should be redelivered
Describe the bug
When the messages in a topic are batched, cumulative acknowledgments do not acknowledge messages as expected. Two behaviors arise when acknowledging a message in the middle of a batch:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The pulsar consumer should send a cumulative acknowledgement for the correct message id. On disconnect, when a cumulative acknowledgment has been sent for a message in the middle of a batch, the consumer should start receiving messages from that point, not from the next batch.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: