conduktor.io ↗

KIP-514 — Add a bounded flush() API to Kafka Producer

Discussion Producer

Adds a `Producer.flush(long timeout, TimeUnit unit)` overload that blocks until all buffered records are sent or the timeout expires, throwing `TimeoutException` on expiry. The existing `flush()` has no timeout, meaning it can block indefinitely if the broker is slow or network connectivity is degraded, giving callers no ability to bound flush duration.

Details

Authorkun du
StatusDiscussion
JIRAKAFKA-7711
WikiView on Apache Wiki
Created2019-08-27
Last Modified2019-10-21
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.