Skip to content

Commit 32b1b30

Browse files
robertojrojasItalyPaleAletmacam
authored
[PubSub MQTT3] Adds Component Metadata Schema (#3070)
Signed-off-by: robertojrojas <[email protected]> Signed-off-by: Roberto Rojas <[email protected]> Signed-off-by: Alessandro (Ale) Segala <[email protected]> Co-authored-by: Alessandro (Ale) Segala <[email protected]> Co-authored-by: Tiago Alves Macambira <[email protected]>
1 parent f074240 commit 32b1b30

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

pubsub/mqtt3/metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
type mqttMetadata struct {
2727
pubsub.TLSProperties `mapstructure:",squash"`
2828
URL string `mapstructure:"url"`
29-
ConsumerID string `mapstructure:"consumerID"`
29+
ConsumerID string `mapstructure:"consumerID" mdignore:"true"`
3030
Qos byte `mapstructure:"qos"`
3131
Retain bool `mapstructure:"retain"`
3232
CleanSession bool `mapstructure:"cleanSession"`

pubsub/mqtt3/metadata.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# yaml-language-server: $schema=../../component-metadata-schema.json
2+
schemaVersion: v1
3+
type: pubsub
4+
name: mqtt3
5+
version: v1
6+
status: stable
7+
title: "MQTT3"
8+
urls:
9+
- title: Reference
10+
url: https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-mqtt3/
11+
authenticationProfiles:
12+
- title: "Connection string"
13+
description: "Authenticate using a connection string."
14+
metadata:
15+
- name: url
16+
type: string
17+
required: true
18+
sensitive: true
19+
description: |
20+
Address of the MQTT broker.
21+
Use the `tcp://`` URI scheme for non-TLS communication.
22+
Use the `ssl://`` URI scheme for TLS communication (requires `caCert`, `clientKey`, `clientCert` to be defined).
23+
example: '"tcp://[username][:password]@host.domain[:port]"'
24+
- name: caCert
25+
type: string
26+
description: |
27+
Certificate authority certificate, required for using TLS.
28+
example: '"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"'
29+
- name: clientCert
30+
type: string
31+
description: |
32+
Client certificate, required for using TLS.
33+
example: '"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"'
34+
- name: clientKey
35+
type: string
36+
sensitive: true
37+
description: |
38+
Client key, required for using TLS.
39+
example: '"-----BEGIN RSA PRIVATE KEY-----\n<base64-encoded DER>\n-----END RSA PRIVATE KEY-----"'
40+
metadata:
41+
- name: retain
42+
type: bool
43+
description: |
44+
Defines whether the message is saved by the broker as the last known good value for a specified topic.
45+
default: 'false'
46+
example: '"true", "false"'
47+
- name: cleanSession
48+
type: bool
49+
description: |
50+
When the value is set to "true", sets the clean_session flag in the connection message to the MQTT broker.
51+
url:
52+
title: "MQTT Clean Sessions Example"
53+
url: "http://www.steves-internet-guide.com/mqtt-clean-sessions-example/"
54+
default: 'false'
55+
example: '"true", "false"'
56+
- name: qos
57+
type: number
58+
description: |
59+
Indicates the Quality of Service Level (QoS) of the message.
60+
url:
61+
title: "MQTT Essentials - Part 6"
62+
url: "https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/"
63+
default: '1'
64+
allowedValues:
65+
- '0'
66+
- '1'
67+
- '2'
68+
example: '2'

0 commit comments

Comments
 (0)