Skip to content

Bring Up Connect

Awantik Das edited this page Feb 5, 2020 · 8 revisions
  1. Start zookeeper
  2. Start broker
  3. Start worker - bin/connect-distributed.sh config/connect-distributed.properties
  4. curl http://localhost:8083/
  5. curl http://localhost:8083/connector-plugins
  6. echo '{"name":"load-kafka-config", "config":{"connector.class":"FileStreamSource","file":"config/server.properties","topic":"newdemo"}}' | curl -X POST -d @- http://localhost:8083/connectors --header "content-Type:application/json"
  7. bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic newdemo --from-beginning
  8. echo '{"name":"dump-kafka-config", "config":{"connector.class":"FileStreamSink","file":"mydata.txt","topics":"newdemo"}}' | curl -X POST -d @- http://localhost:8083/connectors --header "content-Type:application/json"
  9. curl -X DELETE http://localhost:8083/connectors/load-kafka-config
  10. curl -X DELETE http://localhost:8083/connectors/dump-kafka-config

Clone this wiki locally