-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathkafka-connector-source.yaml
More file actions
79 lines (66 loc) · 3.92 KB
/
kafka-connector-source.yaml
File metadata and controls
79 lines (66 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
kind: Secret
apiVersion: v1
metadata:
name: salesforce-credential
namespace: <namespace>
stringData:
username: <username>
password: <password>
clientIdentity: <clientIdentity>
clientSecret: <clientSecret>
type: Opaque
---
apiVersion: eventstreams.ibm.com/v1beta2
kind: KafkaConnector
metadata:
labels:
eventstreams.ibm.com/cluster: <name of Kafka Connect cluster>
name: <name of connector>
namespace: <namespace>
spec:
autoRestart:
# Enables automatic restarting of Kafka connectors in case of errors or failures.
# For more details, see: https://strimzi.io/blog/2023/01/25/auto-restarting-connectors/
enabled: true
maxRestarts: <no. of times the connector attempts to restart in case of an error or failure>
# Connector class name
class: com.ibm.eventstreams.connect.connectivitypack.source.ConnectivityPackSourceConnector
# `tasksMax` should be equal to the number of object-eventType combinations
# In this example it is 5 (Test_task__e - CREATED, Order_Event__e - CREATED, OrderConfirmation__e - CREATED, CaseChangeEvent - UPDATED, Test_CustomObject__c - CREATED_POLLER)
tasksMax: 5
config:
# Which data source to connect to eg. salesforce
connectivitypack.source: salesforce
# URL to access the data source
connectivitypack.source.url: <URL of the data source instance>
# Credentials to access the data source (This example shows auth-type - 'OAUTH2_PASSWORD')
connectivitypack.source.credentials.authType: <auth-type that the data source supports. eg. OAUTH2_PASSWORD>
connectivitypack.source.credentials.username: ${file:/mnt/salesforce-credential:username}
connectivitypack.source.credentials.password: ${file:/mnt/salesforce-credential:password}
connectivitypack.source.credentials.clientIdentity: ${file:/mnt/salesforce-credential:clientIdentity}
connectivitypack.source.credentials.clientSecret: ${file:/mnt/salesforce-credential:clientSecret}
# Objects and associated events to read from the datasource
# For example: The config lists the source objects the connector will listen to. Each object corresponds to a data source object,
# such as Salesforce-style objects or custom events, that the connector processes.
connectivitypack.source.objects: 'Test_task__e,Order_Event__e,OrderConfirmation__e,CaseChangeEvent,Test_CustomObject__c'
# Specifies the events (for example, CREATED, UPDATED) to capture for the 'Test_task__e' object.
# The connector will process only events of the specified type for this object.
connectivitypack.source.Test_task__e.events: CREATED
connectivitypack.source.Order_Event__e.events: CREATED
connectivitypack.source.OrderConfirmation__e.events: CREATED
connectivitypack.source.CaseChangeEvent.events: UPDATED
connectivitypack.source.Test_CustomObject__c.events: CREATED_POLLER
# Subscription parameters for polling. Required only for POLLER events
connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.pollingInterval: 1
connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.updatedField: LastModifiedDate
connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.createdField: CreatedDate
# Optional, sets the format for Kafka topic names created by the connector.
# You can use placeholders like '${object}' and '${eventType}', which the connector will replace automatically.
# Including '${object}' or '${eventType}' in the format is optional. For example, '${object}-topic-name' is a valid format.
# By default, the format is '${object}-${eventType}', but it's shown here for clarity.
connectivitypack.topic.name.format: '${object}-${eventType}'
# standard kafka connector properties
value.converter.schemas.enable: false
value.converter: org.apache.kafka.connect.json.JsonConverter
# Optional, set the topic for producing the heartbeat events.
connectivitypack.source.heartbeat.topic: heartbeat-${topic}