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

> How do I confirm the messages are batched ?

There are a few details here. First, message batching is an internal pulsar 
optimization that is transparent to the producer and consumer, so it isn't 
technically something that a user should have to verify. That being said, if 
you are not getting the throughput that you would like to see, it's always 
possible that the message batching could be tuned. The primary settings are set 
when building the producer using the `newProducer()` method, and they are 
`batchingMaxPublishDelay(long, TimeUnit)`, `batchingMaxMessages(int)`, and 
`enableBatching(boolean)`. By default, the delay is 1 millisecond, the max 
messages is 1000, and batching is enabled.

Based on the code you shared, batching is enabled but is not being leveraged 
because synchronous sends trigger flushes.

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

----
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