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
| Author | Jiangjie Qin |
| Status | Accepted |
| JIRA | KAFKA-1660 |
| Wiki | View on Apache Wiki |
| Created | 2015-03-07 |
| Last Modified | 2015-07-18 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.