This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch cdc-mongodb
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit c1b8bc2f977e4413f135bbaffa063dc8a8aa6e92
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Apr 22 18:44:24 2022 +0200

    MongoDB Changes Stream Consumer Source Kamelet
---
 .../mongodb-changes-stream-source.kamelet.yaml     | 86 ++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml
new file mode 100644
index 00000000..a5f4e025
--- /dev/null
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/mongodb-changes-stream-source.kamelet.yaml
@@ -0,0 +1,86 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: mongodb-changes-stream-source
+  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: "source"
+spec:
+  definition:
+    title: "MongoDB Changes Stream Source"
+    description: |-
+      Consume Changes from MongoDB Collection in streaming mode.
+    required:
+      - hosts
+      - collection
+      - 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
+        - urn:camel:group:credentials
+      username:
+        title: MongoDB Username
+        description: Username for accessing MongoDB. The username must be 
present in the MongoDB's authentication database (authenticationDatabase). By 
default, the MongoDB authenticationDatabase is 'admin'.
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      database:
+        title: MongoDB Database
+        description: Sets the name of the MongoDB database to target.
+        type: string
+  dependencies:
+    - "camel:kamelet"
+    - "camel:mongodb"
+    - "camel:jackson"
+  template:
+    beans:
+      - name: local-mongodb
+        type: "#class:org.apache.camel.component.mongodb.MongoDbComponent"
+    from:
+      uri: "{{local-mongodb}}:test"
+      parameters:
+        hosts: "{{hosts}}"
+        collection: "{{collection}}"
+        password: "{{?password}}"
+        username: "{{?username}}"
+        database: "{{database}}"
+        consumerType: "changeStreams"
+      steps:
+      - marshal:
+          json: {}
+      - to: kamelet:sink

Reply via email to