-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMongoDbSinkConnector.properties
80 lines (68 loc) · 3.3 KB
/
MongoDbSinkConnector.properties
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
80
##
# Copyright (c) 2017. Hans-Peter Grahsl (grahslhp@gmail.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##
name=MyMongoDbSinkConnector #name of your connector
topics=orderrequests,readytobake,readytodecorate,readytobox,readytoship # your kafka topics
tasks.max=1
offset.storage.file.filename=/tmp/connect.offsets
bootstrap.servers=broker:9092
#key.converter=io.confluent.connect.avro.AvroConverter
#key.converter.schema.registry.url=http://localhost:8081
#value.converter=io.confluent.connect.avro.AvroConverter
#value.converter.schema.registry.url=http://localhost:8081
#key.converter=org.apache.kafka.connect.json.JsonConverter
key.converter=org.apache.kafka.connect.storage.StringConverter
key.converter.schemas.enable=false
value.converter=org.apache.kafka.connect.storage.StringConverter
value.converter.schemas.enable=false
connector.class=at.grahsl.kafka.connect.mongodb.MongoDbSinkConnector
# The list of transformations to apply (comma separated, applied in order)
transforms=WrapKey
# The configuration of you transformations
transforms.WrapKey.type=org.apache.kafka.connect.transforms.HoistField$Key
transforms.WrapKey.field=_id
mongodb.document.id.strategy=at.grahsl.kafka.connect.mongodb.processor.id.strategy.ProvidedInKeyStrategy
mongodb.writemodel.strategy=at.grahsl.kafka.connect.mongodb.writemodel.strategy.UpdateOneTimestampsStrategy
#specific MongoDB sink connector props
#listed below are the defaults
#Note:
# Use "docker.internal.host" if you are spinning only connector container.
# Use "broker" if you are spinning connector container as part of docker-compose with extra-host paramaters.
mongodb.connection.uri=mongodb://docker.internal.host:27017/test
mongodb.collection=orderrequests,readytobake,readytodecorate,readytobox,readytoship
#Named topic <-> collection mappings
mongodb.collection.orderrequests=orderrequests
mongodb.collection.readytobake=readytobake
mongodb.collection.readytodecorate=readytodecorate
mongodb.collection.readytobox=readytobox
mongodb.collection.readytoship=readytoship
mongodb.max.num.retries=3
mongodb.retries.defer.timeout=5000
mongodb.value.projection.type=none
mongodb.value.projection.list=
mongodb.document.id.strategy=at.grahsl.kafka.connect.mongodb.processor.id.strategy.BsonOidStrategy
mongodb.document.id.strategies=
mongodb.key.projection.type=none
mongodb.key.projection.list=
mongodb.field.renamer.mapping=[]
mongodb.field.renamer.regexp=[]
mongodb.post.processor.chain=at.grahsl.kafka.connect.mongodb.processor.DocumentIdAdder
mongodb.change.data.capture.handler=
mongodb.delete.on.null.values=false
mongodb.writemodel.strategy=at.grahsl.kafka.connect.mongodb.writemodel.strategy.ReplaceOneDefaultStrategy
mongodb.max.batch.size=0
mongodb.rate.limiting.timeout=0
mongodb.rate.limiting.every.n=0
plugin.path=/usr/share/java,/usr/share/confluent-hub-components #this is important