File tree Expand file tree Collapse file tree 2 files changed +42
-5
lines changed
src/reference/config/bindings/mqtt/.partials Expand file tree Collapse file tree 2 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -52,26 +52,56 @@ An MQTT client identifier, allowing the usage of wildcards.
5252
5353> `array` of `object`
5454
55- Array of MQTT topic names for publish capability.
55+ Array of MQTT topic configs for publish capability.
5656
5757# ### publish[].topic
5858
5959> `string`
6060
6161The MQTT topic to match on that supports standard MQTT wildcards `/+/`, `/#`.
6262
63+ Also, supports embedded parameters (e.g., `{id}`) for dynamic topic matching.
64+
65+ # ### publish[].params
66+
67+ > `object` as map of named `string`
68+
69+ Enforce validation of topic embedded parameters.
70+
71+ ` ` ` yaml
72+ publish:
73+ - topic: device/{id}
74+ params:
75+ id: ${guarded['jwt'].identity}
76+ ` ` `
77+
6378# ### when[].subscribe
6479
6580> `array` of `object`
6681
67- Array of MQTT topic names for subscribe capability.
82+ Array of MQTT topic configs for subscribe capability.
6883
6984# ### subscribe[].topic
7085
7186> `string`
7287
7388The MQTT topic to match on that supports standard MQTT wildcards `/+/`, `/#`.
7489
90+ Also, supports embedded parameters (e.g., `{id}`) for dynamic topic matching.
91+
92+ # ### subscribe[].params
93+
94+ > `object` as map of named `string`
95+
96+ Enforce validation of topic embedded parameters.
97+
98+ ` ` ` yaml
99+ subscribe:
100+ - topic: device/{id}
101+ params:
102+ id: ${guarded['jwt'].identity}
103+ ` ` `
104+
75105# ### routes[].exit
76106
77107> `string`
Original file line number Diff line number Diff line change 1111 - v5
1212 - v3.1.1
1313 routes :
14- - when :
14+ - guarded :
15+ my_jwt_guard :
16+ - mqtt:stream
17+ when :
1518 - session :
1619 - client-id : " *"
1720 - publish :
18- - topic : command/one
19- - topic : command/two
21+ - topic : device/{id}/location
22+ params :
23+ id : ${guarded['my_jwt_guard'].identity}
24+ - topic : device/{id}/temperature
25+ params :
26+ id : ${guarded['my_jwt_guard'].identity}
2027 - subscribe :
2128 - topic : reply
2229 exit : mqtt_kafka_proxy
You can’t perform that action at this time.
0 commit comments