gmethvin commented on a change in pull request #5989: [docs] Improve 
documentation about batching
URL: https://github.com/apache/pulsar/pull/5989#discussion_r363653260
 
 

 ##########
 File path: site2/docs/concepts-messaging.md
 ##########
 @@ -49,7 +49,14 @@ Messages published by producers can be compressed during 
transportation in order
 
 ### Batching
 
-If batching is enabled, the producer will accumulate and send a batch of 
messages in a single request. Batching size is defined by the maximum number of 
messages and maximum publish latency.
+If batching is enabled, the producer will accumulate and send a batch of 
messages in a single request. Batch size is defined by the maximum number of 
messages and maximum publish latency.
+
+Batches are tracked and stored by Pulsar as batches rather than as individual 
messages. Under the hood the consumer unbundles these batches into individual 
messages. Since the messages are stored as batches, the backlog size will also 
represent the total number of batches rather than the total number of messages.
+
+Scheduled messages (using `deliverAt` or `deliverAfter`) are always sent as 
individual messages even when batching is enabled.
+
+> Note
+> Since batches are tracked as single units, a batch will only be considered 
acknowledged when all its messages are acknowledged by the consumer. This means 
unexpected failures, negative acknowledgements, and acknowledgement timeouts 
can result in redelivery of all messages in the batch, even if some of the 
messages have already been acknowledged.
 
 Review comment:
   If we agree it's definitely a bug, then let's get the fix and this 
documentation update in the next release, and I'll remove the part about 
negative acks.

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


With regards,
Apache Git Services

Reply via email to