Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
Kinesis Source Connector¶
The Kinesis Source Connector is used to pull data from Amazon Kinesis and persist the data to a Kafka topic.
Examples¶
Property based example¶
This configuration is used typically along with standalone workers.
name=KinesisSourceConnector1
connector.class=io.confluent.connect.kinesis.KinesisSourceConnector
tasks.max=1
aws.access.key.id=< Required Configuration >
aws.secret.key.id=< Required Configuration >
kafka.topic=< Required Configuration >
kinesis.stream=< 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
{
"config" : {
"name" : "KinesisSourceConnector1",
"connector.class" : "io.confluent.connect.kinesis.KinesisSourceConnector",
"tasks.max" : "1",
"aws.access.key.id" : "< Required Configuration >",
"aws.secret.key.id" : "< Required Configuration >",
"kafka.topic" : "< Required Configuration >",
"kinesis.stream" : "< Required Configuration >"
}
}
Use curl to post the configuration to one of the Kafka Connect Workers. Change http://localhost:8083/ the the endpoint of one of your Kafka Connect worker(s).
curl -s -X POST -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors
curl -s -X PUT -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors/KinesisSourceConnector1/config