lhotari commented on issue #22439:
URL: https://github.com/apache/pulsar/issues/22439#issuecomment-2039699140

   > For the purpose of reduce the sync-api send message latency, client will 
flush messages to broker when you call the sync-api.
   
   @dao-jun  Yes, this is reasonable, but the problem is that this doesn't seem 
to be documented any where.
   
   I found the flushing logic here:
   
https://github.com/apache/pulsar/blob/ffff639a1b73a34bbb5115503d4c7783bb2a2770/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TypedMessageBuilderImpl.java#L82-L86
   
   I think @ragaur-tibco's issue report is great and the minimum resolution is 
to document the behavior. 
   It seems that there could be a use case where one would want to achieve 
batching while using the synchronous API. That's not currently supported. We 
have 2 options for resolving this:
   
   1. Documenting the behavior and making it explicit that synchronous send 
will trigger flushing of the current batch message.
   2. Adding support for controlling the triggering behavior so that batching 
would be possible also with the synchronous API.
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to