You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/08/09 18:26:01 UTC

[GitHub] [pulsar] epsteina16 opened a new issue #4931: Cumulative acknowledgement on batched acknowledgements produce unexpected behavior

epsteina16 opened a new issue #4931: Cumulative acknowledgement on batched acknowledgements produce unexpected behavior
URL: https://github.com/apache/pulsar/issues/4931
 
 
   **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:
   1. A cumulative acknowledgment for the current message is not sent, instead, an individual acknowledgment for the previous message in the batch is sent.
   2. 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:
   1. Add messages to a topic with batching enabled
   2. Create a consumer on the topic with ackGroupTime set to 0.
   3. When a message is received, expose the underlying BatchMessageIdImpl on the MessageId to know where the message is in a batch.
   4. 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
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services