You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Hector Geraldino (BLOOMBERG/ 919 3RD A)" <hg...@bloomberg.net> on 2022/10/05 19:00:52 UTC

Connector API callbacks for create/delete events

Hi,

We've some custom connectors that require provisioning external resources (think of creating queues, S3 buckets, or activating accounts) when the connector instance is created, but also need to cleanup these resources (delete, deactivate) when the connector instance is deleted.

The connector API (org.apache.kafka.connect.connector.Connector) provides a start() and stop() methods and, while we can probably work around the start() method to check if the initialization of external resources has been done, there is currently no hook that a connector can use to perform any cleanup task when it is deleted. 

I'm planning to write a KIP that enhances the Connector API by having methods that are invoked by the Herder when connectors are created and/or deleted; but before doing so, I wanted to ask the community if there's already some workaround(s) that we can be used to achieve these tasks.

Thank you!