如果在salesforce-example.properties中将对象设置为“ Case”而不是默认的“ Lead”,则单独连接会产生以下错误。
ERROR WorkerSourceTask{id=salesforce-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:177)
java.lang.UnsupportedOperationException: Field type 'location' for field 'pkbgeolocalization__c' is not supported
at io.confluent.salesforce.common.SObjectHelper.schema(SObjectHelper.java:165)
at io.confluent.salesforce.common.SObjectHelper.valueSchema(SObjectHelper.java:188)
at io.confluent.salesforce.pushtopic.SalesforcePushTopicSourceTask.createTopicChannelMessageListener(SalesforcePushTopicSourceTask.java:59)
at io.confluent.salesforce.common.AbstractSalesforceSourceTask.authenticateAndHanshake(AbstractSalesforceSourceTask.java:211)
at io.confluent.salesforce.common.AbstractSalesforceSourceTask.start(AbstractSalesforceSourceTask.java:249)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:199)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:175)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:219)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
“ salesforce.object =案例”
配置:
name=salesforce tasks.max=1
connector.class=io.confluent.salesforce.SalesforceSourceConnector
salesforce.instance=http://test.salesforce.com
salesforce.username=xxxx
salesforce.password=****
salesforce.password.token=****
salesforce.consumer.key=****
salesforce.consumer.secret=****
salesforce.push.topic.create=false
salesforce.object=Case
salesforce.push.topic.name=updates
kafka.topic=salesforce_updates
curl.logging=false
confluent.topic.bootstrap.servers=localhost:9092
confluent.topic.replication.factor=1