Important
You are viewing documentation for an older version of Confluent Platform. For the latest, click here.
Salesforce Source Connector¶
The Salesforce Source Connector is used to capture changes from Salesforce.com utilizing the Salesforce streaming API.
Note
The connector will dynamically create push topics when the connector is launched.
Examples¶
Property based example¶
This configuration is used typically along with standalone workers.
name=SalesforceSourceConnector1
connector.class=io.confluent.salesforce.SalesforceSourceConnector
tasks.max=1
kafka.topic=< Required Configuration >
salesforce.consumer.key=< Required Configuration >
salesforce.consumer.secret=< Required Configuration >
salesforce.object=< Required Configuration >
salesforce.password=< Required Configuration >
salesforce.password.token=< Required Configuration >
salesforce.push.topic.name=< Required Configuration >
salesforce.username=< 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" : "SalesforceSourceConnector1",
"connector.class" : "io.confluent.salesforce.SalesforceSourceConnector",
"tasks.max" : "1",
"kafka.topic" : "< Required Configuration >",
"salesforce.consumer.key" : "< Required Configuration >",
"salesforce.consumer.secret" : "< Required Configuration >",
"salesforce.object" : "< Required Configuration >",
"salesforce.password" : "< Required Configuration >",
"salesforce.password.token" : "< Required Configuration >",
"salesforce.push.topic.name" : "< Required Configuration >",
"salesforce.username" : "< 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/SalesforceSourceConnector1/config