KIP-8 — Add a flush method to the producer API
Accepted Producer
Adds a KafkaProducer.flush() method that blocks until all buffered records in the RecordAccumulator have been sent and acknowledged. Without flush(), callers had to iterate over all returned Future objects to wait for send completion, and with linger.ms > 0 the last batch was artificially delayed waiting for more records that would never arrive.
Details
| Author | Jay Kreps |
| Status | Accepted |
| JIRA | KAFKA-1865 |
| Wiki | View on Apache Wiki |
| Created | 2015-02-08 |
| Last Modified | 2015-07-18 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.