Example configurations

Property-based example

This configuration is used typically along with standalone workers.

 name=MapRDBSinkConnector1
 connector.class=io.confluent.connect.mapr.db.MapRDBSinkConnector
 tasks.max=1
 topics=< Required Configuration >

REST-based example

This configuration is used typically along with distributed workers. Write the following json to connector.json, configure all of the required values, and use the command below to post the configuration to one the distributed connect worker(s). Check here for more information about the Kafka Connect REST API

Connect Distributed REST example:

 {
   "config" : {
     "name" : "MapRDBSinkConnector1",
     "connector.class" : "io.confluent.connect.mapr.db.MapRDBSinkConnector",
     "tasks.max" : "1",
     "topics" : "< Required Configuration >"
   }
 }

Use curl to post the configuration to one of the Kafka Connect Workers. Change http://localhost:8083/ the endpoint of one of your Kafka Connect worker(s).

Create a new connector:

curl -s -X POST -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors

Update an existing connector: .. codewithvars:: bash

curl -s -X PUT -H ‘Content-Type: application/json’ –data @connector.json http://localhost:8083/connectors/MapRDBSinkConnector1/config