1

The debezium kafka connect command is : docker run -it --rm --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses --link zookeeper:zookeeper --link kafka:kafka --link mysql:mysql debezium/connect:0.9

Is there an equivalent way to not run inside a docker container with flags to specify the zookeeper instance and kafka bootstrap servers/broker ? I have my kafka and zookeeper running on my mac locally but not inside a docker container .

Thanks

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

1 Answers1

1

There are no "flags", just properties files. The docker image is just using variable substitution inside of those files.

You can refer to the Debezium installation documentation, and it is just a plugin to Kafka Connect, which is included with your Kafka installation.

Find connect-standalone.properties in your Kafka install to get started. One important property you will want to edit is plugin.path, which must be the full parent path to where you put the Debezium JAR files. Then Kafka is configured there as well

Then you would run this to start a single node

connect-standalone.sh connect-standalone.properties your-debezium-config.properties

(Docker image is running connect-distributed.sh, but you wouldn't need to run a Cluster just on your Mac)

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Can you show your-debezium-config.properties schema? Is this here? ```"connector.class": "io.debezium.connector.mysql.MySqlConnector", "tasks.max": "1", "database.hostname": "mysql", "database.port": "3306", "database.user": "debezium", "database.password": "dbz", "database.server.id": "184054", "database.server.name": "dbserver1", "database.whitelist": "inventory", "database.history.kafka.bootstrap.servers": "kafka:9092", "database.history.kafka.topic": "dbhistory.inventory", "name": "inventory-connector"``` – MasterLuV Jun 14 '19 at 11:34
  • 1
    @MasterLuV `connect-standalone` takes Java Properties files (lines of `key=value`), not JSON – OneCricketeer Jun 14 '19 at 15:38
  • @cricket_007: Thank you! How can i know what is required property? I can't see in the document – MasterLuV Jun 17 '19 at 08:36
  • 1
    @MasterLuV In your existing Kafka installation, you can find a documented `connect-standalone.properties`. The other property file is the exact same properties from the JSON, only not JSON, just `key=vaule` pairs on each line. – OneCricketeer Jun 17 '19 at 16:45