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

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

commit d1e113fe55566739f94646e75ed8783ed8a4fe93
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Tue Mar 15 14:15:32 2022 +0100

    Added Mqtt5 v5 Source Kamelet
---
 .../resources/kamelets/mqtt5-source.kamelet.yaml   | 80 ++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/mqtt5-source.kamelet.yaml 
b/library/camel-kamelets/src/main/resources/kamelets/mqtt5-source.kamelet.yaml
new file mode 100644
index 0000000..68ebf76
--- /dev/null
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/mqtt5-source.kamelet.yaml
@@ -0,0 +1,80 @@
+# ---------------------------------------------------------------------------
+# 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: mqtt5-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,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMiIgYmFzZVByb2ZpbGU9InRpbnkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIKCSB5PSIwcHgiIHZpZXdCb3g9IjAgMCAzMjAgMzIwIiBvdmVyZmxvdz0idmlzaWJsZSIgeG1sOnNwYWNlPSJwcm
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "MQTT 5"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "MQTT 5 Source"
+    description: |-
+      Allows receiving messages from any endpoint that supports the MQTT v5 
protocol, such as a message broker.
+    required:
+    - topic
+    - brokerUrl
+    type: object
+    properties:
+      topic:
+        title: Topic
+        description: The topic to subscribe to
+        type: string
+        example: "mytopic"
+      brokerUrl:
+        title: Broker URL
+        description: The URL of the broker where to establish the connection
+        type: string
+        example: "tcp://mosquitto:1883"
+      clientId:
+        title: Client ID
+        description: The client ID to use when connecting to the resource
+        type: string
+        default: "mqtt-source"
+      username:
+        title: Username
+        description: Username to use when connecting to the MQTT v5 compliant 
broker
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: Password to use when connecting to the MQTT v5 compliant 
broker
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  dependencies:
+    - "camel:paho-mqtt5"
+    - "camel:kamelet"
+  template:
+    from:
+      uri: paho-mqtt5:{{topic}}
+      parameters:
+        brokerUrl: "{{brokerUrl}}"
+        clientId: "{{clientId}}"
+        userName: "{{?username}}"
+        password: "{{?password}}"
+      steps:
+      - to: kamelet:sink

Reply via email to