You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add simple batch support for sink record processing (#51)
There is a new configuration parameter mongodb.max.batch.size=N to specify
the batching behaviour. For reasons of backwards compatibility the default value
of N=0 means that no batching is applied. For values of N>=1 the write
behaviour towards the configured MongoDB instance guarantees that
at most N records are written within a single bulkwrite operation.
This resolves#49
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -546,25 +546,26 @@ The sink records are converted to BSON documents which are in turn inserted into
546
546
547
547
Data is written using acknowledged writes and the configured write concern level of the connection as specified in the connection URI. If the bulk write fails (totally or partially) errors are logged and a simple retry logic is in place. More robust/sophisticated failure mode handling has yet to be implemented.
548
548
549
-
### Sink Connector Properties
549
+
### Sink Connector Configuration Properties
550
550
551
551
At the moment the following settings can be configured by means of the *connector.properties* file. For a config file containing default settings see [this example](https://github.com/hpgrahsl/kafka-connect-mongodb/blob/master/config/MongoDbSinkConnector.properties).
552
552
553
553
| Name | Description | Type | Default | Valid Values | Importance |
| mongodb.collection | single sink collection name to write to | string | kafkatopic || high |
556
556
| mongodb.connection.uri | the monogdb connection URI as supported by the offical drivers | string | mongodb://localhost:27017/kafkaconnect?w=1&journal=true || high |
557
-
| mongodb.document.id.strategy | class name of strategy to use for generating a unique document id (_id) | string | at.grahsl.kafka.connect.mongodb.processor.id.strategy.BsonOidStrategy |at.grahsl.kafka.connect.mongodb.MongoDbSinkConnectorConfig$ValidatorWithOperators$$Lambda$193/910091170@3f191845| high |
557
+
| mongodb.document.id.strategy | class name of strategy to use for generating a unique document id (_id) | string | at.grahsl.kafka.connect.mongodb.processor.id.strategy.BsonOidStrategy |valid fully-qualified class name which implements IdStrategy and is available on the classpath | high |
558
558
| mongodb.delete.on.null.values | whether or not the connector tries to delete documents based on key when value is null | boolean | false || medium |
559
+
| mongodb.max.batch.size | maximum number of sink records to possibly batch together for processing | int | 0 |[0,...]| medium |
559
560
| mongodb.max.num.retries | how often a retry should be done on write errors | int | 3 |[0,...]| medium |
560
561
| mongodb.retries.defer.timeout | how long in ms a retry should get deferred | int | 5000 |[0,...]| medium |
561
-
| mongodb.change.data.capture.handler | class name of CDC handler to use for processing | string | "" |at.grahsl.kafka.connect.mongodb.MongoDbSinkConnectorConfig$ValidatorWithOperators$$Lambda$193/910091170@5f049ea1| low |
562
-
| mongodb.document.id.strategies | comma separated list of custom strategy classes to register for usage | string | "" |at.grahsl.kafka.connect.mongodb.MongoDbSinkConnectorConfig$ValidatorWithOperators$$Lambda$193/910091170@72cc7e6f| low |
563
-
| mongodb.field.renamer.mapping | inline JSON array with objects describing field name mappings (see docs)| string |[]|| low |
564
-
| mongodb.field.renamer.regexp | inline JSON array with objects describing regexp settings (see docs)| string |[]|| low |
562
+
| mongodb.change.data.capture.handler | class name of CDC handler to use for processing | string | "" |valid fully-qualified class name which extends CdcHandler and is available on the classpath | low |
563
+
| mongodb.document.id.strategies | comma separated list of custom strategy classes to register for usage | string | "" |list of valid fully-qualified class names which implement IdStrategy and are available on the classpath | low |
564
+
| mongodb.field.renamer.mapping | inline JSON array with objects describing field name mappings | string |[]|| low |
| mongodb.key.projection.list | comma separated list of field names for key projection | string | "" || low |
566
567
| mongodb.key.projection.type | whether or not and which key projection to use | string | none |[none, blacklist, whitelist]| low |
567
-
| mongodb.post.processor.chain | comma separated list of post processor classes to build the chain with | string | at.grahsl.kafka.connect.mongodb.processor.DocumentIdAdder |at.grahsl.kafka.connect.mongodb.MongoDbSinkConnectorConfig$ValidatorWithOperators$$Lambda$193/910091170@5afa3c9| low |
568
+
| mongodb.post.processor.chain | comma separated list of post processor classes to build the chain with | string | at.grahsl.kafka.connect.mongodb.processor.DocumentIdAdder |list of valid fully-qualified class names which extend PostProcessor and are available on the classpath | low |
568
569
| mongodb.value.projection.list | comma separated list of field names for value projection | string | "" || low |
569
570
| mongodb.value.projection.type | whether or not and which value projection to use | string | none |[none, blacklist, whitelist]| low |
570
571
| mongodb.writemodel.strategy | how to build the write models for the sink documents | string | at.grahsl.kafka.connect.mongodb.writemodel.strategy.ReplaceOneDefaultStrategy || low |
0 commit comments