conduktor.io ↗

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

AuthorAndrew Schofield
StatusDiscussion
JIRAKAFKA-7841
WikiView on Apache Wiki
Created2019-01-18
Last Modified2019-01-24
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.