Home > other >  How can I best add connector to kafka connect in docker compose?
How can I best add connector to kafka connect in docker compose?

Time:12-16

Right now I have a docker compose that creates the Kafka cluster and Kafka connect. It also creates a shell container which I use to send a POST with the configuration to add a new connector. How can I setup the docker compose to add a connector (with my configuration) AFTER kafka connect is ready?

CodePudding user response:

The cURL request does exactly that - waits for the Connect REST API to be available, then creates the connector if it doesn't already exist.

One "better" way would not to use Compose, and instead Minikube w/ Strimzi Operator with KafkaConnect resource type where you can define Connectors as YAML config rather than HTTP JSON requests.

  • Related