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
commit 8d2e790ff34b6bc317b78665520e3f3b4d876adc Author: Andrea Cosentino <[email protected]> AuthorDate: Fri Jun 25 14:22:28 2021 +0200 Added MongoDB Sink Kamelet --- .../resources/kamelets/mongodb-sink.kamelet.yaml | 73 ++++++++++++++++++++++ 1 file changed, 73 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 new file mode 100644 index 0000000..a24f27c --- /dev/null +++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/mongodb-sink.kamelet.yaml @@ -0,0 +1,73 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: mongodb-sink + annotations: + camel.apache.org/kamelet.support.level: "Preview" + camel.apache.org/catalog.version: "main-SNAPSHOT" + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMzEgNjciIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI0EiIHg9IjEiIHk9IjEiLz48c3ltYm9sIGlkPSJBIiBvdmVyZmxvdz0idmlzaWJsZSI+PGcgc3Ryb2tlPSJub25lIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjxwYXRoIGQ9Ik0xNC4xNzQuMTc1bD [...] + camel.apache.org/provider: "Apache Software Foundation" + camel.apache.org/kamelet.group: "MongoDB" + labels: + camel.apache.org/kamelet.type: "sink" +spec: + definition: + title: "MongoDB Sink" + description: |- + Send documents to MongoDB. + + This Kamelet expects a JSON as body. + required: + - hosts + - collection + - password + - username + - database + type: object + properties: + hosts: + title: MongoDB Hosts + description: Comma separated list of MongoDB Host Addresses in host:port format. + type: string + collection: + title: MongoDB Collection + description: Sets the name of the MongoDB collection to bind to this endpoint. + type: string + password: + title: MongoDB Password + description: User password for accessing MongoDB. + type: string + format: password + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + username: + title: MongoDB Username + description: Username for accessing MongoDB. + type: string + database: + title: MongoDB Database + description: Sets the name of the MongoDB database to target. + type: string + types: + in: + mediaType: application/json + dependencies: + - "camel:kamelet" + - "camel:mongodb" + - "camel:jackson" + flow: + beans: + - name: local-mongodb + type: "#class:org.apache.camel.component.mongodb.MongoDbComponent" + from: + uri: kamelet:source + steps: + - to: + uri: "{{local-mongodb}}:test" + parameters: + hosts: "{{hosts}}" + collection: "{{collection}}" + password: "{{password}}" + username: "{{username}}" + database: "{{database}}" + operation: "insert"
