New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Producer batching is not working with synchronous mode using send api #22439
Comments
For the purpose of reduce the sync-api send message latency, client will flush messages to broker when you call the sync-api. |
Thanks for the good issue report @ragaur-tibco ! |
@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: pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TypedMessageBuilderImpl.java Lines 82 to 86 in ffff639
I think @ragaur-tibco's issue report is great and the minimum resolution is to document the behavior.
I'm personally in favor of option 1., but I'm open for option 2. if someone supports that and the change goes through the typical PIP process we have in Pulsar. |
@lhotari I prefer option 1, and I'll fix the doc later. |
Search before asking
Read release policy
Version
3.2.x
Minimal reproduce step
What did you expect to see?
number of messages should increase from 0 to 4 in a single batch(as max number of messages configured in a single batch was 5) and below are the pulsar SDK logs which should print in console
just like working in async mode
What did you see instead?
number of messages in a single batch is always 0 while using the synchronous mode
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: