This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 0ae207b Regen for commit 35e81bf409aca0fe9a27b4f540310bbdd691b694
0ae207b is described below
commit 0ae207bd091ea4de1b4ea29e65c231ba95e15f30
Author: oscerd <[email protected]>
AuthorDate: Thu Jul 1 06:20:05 2021 +0000
Regen for commit 35e81bf409aca0fe9a27b4f540310bbdd691b694
Signed-off-by: GitHub <[email protected]>
---
.../resources/kamelets/mongodb-sink.kamelet.yaml | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git
a/library/camel-kamelets-catalog/src/main/resources/kamelets/mongodb-sink.kamelet.yaml
b/library/camel-kamelets-catalog/src/main/resources/kamelets/mongodb-sink.kamelet.yaml
index a24f27c..ec7e07f 100644
---
a/library/camel-kamelets-catalog/src/main/resources/kamelets/mongodb-sink.kamelet.yaml
+++
b/library/camel-kamelets-catalog/src/main/resources/kamelets/mongodb-sink.kamelet.yaml
@@ -17,6 +17,10 @@ spec:
Send documents to MongoDB.
This Kamelet expects a JSON as body.
+
+ Properties you can as headers:
+
+ `db-upsert` / `ce-db-upsert` If the database should create the element
if it does not exist. Boolean value.
required:
- hosts
- collection
@@ -48,6 +52,17 @@ spec:
title: MongoDB Database
description: Sets the name of the MongoDB database to target.
type: string
+ writeConcern:
+ title: Write Concern
+ description: Configure the level of acknowledgment requested from
MongoDB for write operations, possible values are ACKNOWLEDGED, W1, W2, W3,
UNACKNOWLEDGED, JOURNALED, MAJORITY.
+ type: string
+ createCollection:
+ title: Collection
+ description: Create collection during initialisation if it doesn't
exist.
+ type: boolean
+ default: false
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
types:
in:
mediaType: application/json
@@ -62,9 +77,23 @@ spec:
from:
uri: kamelet:source
steps:
+ - choice:
+ when:
+ - simple: "${header[db-upsert]}"
+ steps:
+ - set-header:
+ name: CamelMongoDbUpsert
+ simple: "${header[db-upsert]}"
+ - simple: "${header[ce-db-upsert]}"
+ steps:
+ - set-header:
+ name: CamelMongoDbUpsert
+ simple: "${header[ce-db-upsert]}"
- to:
uri: "{{local-mongodb}}:test"
parameters:
+ createCollection: "{{?createCollection}}"
+ writeConcern: "{{?writeConcern}}"
hosts: "{{hosts}}"
collection: "{{collection}}"
password: "{{password}}"