Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The flush call itself will hold a lock so that only one flush call can be invoked at any given time (this is for implementation simplicity as it is tricky to have multiple flush calls in progress at a given time and track the point they each guarantee.

Currently there is no hard request timeout except what the server enforces, however when a client side timeout is added we can bound the time flush() will take by this timeout since after that time expires the request will be considered failed and hence completed.

Proposed Changes

The full description is pretty much covered in the api description. There is a first pass on implementation here.

Compatibility, Deprecation, and Migration Plan

...

No existing users of KafkaProducer should be broken, though.

Rejected

...

Alternative

  1. Do nothing and just instruct people to use the futures. 

  2. Making the signature flush(long timeout, TimeUnit), we decided it is good enough to allow setting a request timeout and having that be the implicit timeout for flush() (since then the requests will be considered failed and hence completed).