I created a cassandra-sink connector after that I made some changes in connector.properties
file. After stopping the worker and starting it again, now when I add the connector using:
java -jar kafka-connect-cli-1.0.6-all.jar create cassandra-sink-orders < cassandra-sink-distributed-orders.properties
I get the following error:
Error: the Kafka Connect API returned: Connector cassandra-sink-orders already exists (409)
How can I remove the existing connector?
Either: Press Ctrl+Delete. Right-click on the connector and select the 'Delete Connector' option, or. Press the Delete key.
You can stop a specific connector by deleting the connector using the REST API [1]. You would need to make this REST call for every connector. If you have a lot of connectors running, you could write a little script that fetches the list of connectors [2] and deletes them one at a time, in a loop.
There are two restart methods in the Kafka Connect REST API: POST /connectors/{connectorName}/restart – restarts only the Connector instance for the named connector. POST /connectors/{connectorName}/tasks/{taskNum}/restart – restarts only the Task instance for the named connector and specified task number.
The Kafka Connect JMS Source connector is used to move messages from any JMS-compliant broker into Apache Kafka®. The Kafka Connect Elasticsearch Service Sink connector moves data from Apache Kafka® to Elasticsearch. It writes data from a topic in Kafka to an index in Elasticsearch.
To delete a connector, you can run:
curl -X DELETE http://localhost:8083/connectors/<connector-name>
You can use the Kafka Connect REST API, which includes an endpoint for DELETE
ing a connector.
curl -X DELETE http://$KAFKACONNECTWORKER_HOST:$KAFKACONNECTWORKER_PORT/connectors/$CONNECTOR_NAME
For example:
curl -X DELETE http://localhost:8083/connectors/src-jdbc-orders
🎥 See it in action here: https://www.youtube.com/watch?v=1EenWEm-5dg&t=378s
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With