conduktor.io ↗

KIP-15 — Add a close method with a timeout in the producer

Accepted Producer

Adds a close(long timeout, TimeUnit unit) method to KafkaProducer that attempts graceful shutdown within the specified bound, aborting unsent records after the timeout expires. The original close() waited indefinitely for all buffered records to be sent, which was unacceptable for deployment tools requiring bounded shutdown or for mirror-maker scenarios where reordering must be avoided after a send failure.

Details

AuthorJiangjie Qin
StatusAccepted
JIRAKAFKA-1660
WikiView on Apache Wiki
Created2015-03-07
Last Modified2015-07-18
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.