KIP-419 — Safely notify Kafka Connect SourceTask is stopped
Discussion Connect
Adds a `cleanupResources()` callback to `SourceTask` that the Connect framework calls exactly once after the task has fully stopped, providing a safe place to release resources regardless of how many times `stop()` was called. The existing `stop()` method can be invoked multiple times and is called from a different thread than `poll()`, making it unsafe to release non-thread-safe resources (e.g., JDBC connections) in `stop()`.
Details
| Author | Andrew Schofield |
| Status | Discussion |
| JIRA | KAFKA-7841 |
| Wiki | View on Apache Wiki |
| Created | 2019-01-18 |
| Last Modified | 2019-01-24 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.