# Camel SalesForce Kafka Connector PoC

## Running the Source connector Locally
1. To create SalesForce application and get credentials, please follow this guide: https://github.com/apache/camel-examples/blob/main/examples/salesforce-consumer/README.adoc
You need `Client ID`, `Client Secret` and `Refresh Token`
2. The following env variables should be populated in docked-compose.yml:\
- KAFKA_TOPICS: kafka topic to write messages to
- SF_INSTANCE: your salesforce login URL
- SF_CONSUMER_KEY: SalesForce Client ID from #1
- SF_CONSUMER_SECRET: SalesForce Client Secret from #1
- SF_REFRESH_TOKEN: SalesForce Refresh Token from #1
3. Start the connector\
`docker compose up`

By default, the connector is configured to listen to all changes, being made 
to `Contact` objects in SalesForce. So you can create or edit a contact in Salesforce 
UI and you should see the messages coming to Kafka topic. If you'd like to change 
the subscription setup to listen to other object changes, you can edit `SF_SOBJECT_QUERY` 
variable in docker-compose.yml
