GitHub user michaeljmarshall added a comment to the discussion: Test / 
Experiment Batching locally

Thank you for this sample code. The first thing to note is that using 
synchronous sends by calling `.send()` will likely not result in batched 
messages because the `send()` call returns only when the broker sends 
acknowledgement that the message has been persisted, when using a persistent 
topic. Technically, if you share the producer across threads and call `send` 
within the message batching window, it is possible to use synchronous sends and 
get some benefit of batching. The main way to benefit from batching is to use 
the `sendAsync` method and then track the result with the returned future.

GitHub link: 
https://github.com/apache/pulsar/discussions/17027#discussioncomment-3363431

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@pulsar.apache.org

Reply via email to