Reputation: 2047
I am running file connector in standalone mode . I updated the sink connect properties file while connect is running. The changes are NOT reflected unless I restarted the connect such as
> bin/connect-standalone.sh config/connect-standalone.properties
> config/connect-file-source.properties
> config/connect-file-sink.properties
Is it possible to update the connect properties run time without restarting the connect again
Upvotes: 0
Views: 299
Reputation: 32060
No, this is not possible using standalone mode. This is another good reason to use distributed mode, in which you can add, update, and delete configuration whilst the worker is running using the REST interface. To create or update a connector you'd use PUT
:
curl -i -X PUT -H "Content-Type:application/json" http://localhost:8083/connectors/source-file-01/config \
-d '{
"connector.class": "org.apache.kafka.connect.file.FileStreamSourceConnector",
"tasks.max": "1",
"file": "/usr/share/details.txt",
"topic": "KTest",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "org.apache.kafka.connect.storage.StringConverter",
"name": "file_source"
}'
To delete it you'd use
curl -i -X DELETE -H "Content-Type:application/json" http://localhost:8083/connectors/source-file-01
Upvotes: 1