mqtt Binding
mqtt Binding
Zilla runtime mqtt binding.
mqtt_server:
type: mqtt
kind: server
routes:
- when:
- session:
- client-id: "*"
- publish:
- topic: command/one
- topic: command/two
- subscribe:
- topic: reply
exit: mqtt_kafka_proxy
Summary
Defines a binding with mqtt protocol support, with server behavior.
The server kind mqtt binding decodes the MQTT protocol on the inbound network stream, producing higher level application streams for each publish or subscribe topic. The session state is also described by a higher level application stream.
Conditional routes based on the topic name are used to route these application streams to an exit binding.
Configuration
kind*
enum[ "server" ]
Behave as a mqtt server.
exit
string
Default exit binding when no conditional routes are viable.
exit: echo_server
routes
arrayofobject
Conditional mqtt-specific routes.
routes[].guarded
objectas named map ofstring:stringarray
List of roles required by each named guard to authorize this route.
routes:
- guarded:
test:
- read:items
routes[].when
arrayofobject
List of conditions (any match) to match this route.
Read more: When a route matches
routes:
- when:
- session:
- client-id: "*"
- publish:
- topic: command/one
- topic: command/two
- subscribe:
- topic: reply
when[].session
arrayofobject
Array of mqtt session properties
session.client-id
string
An MQTT client identifier, allowing the usage of wildcards.
when[].publish
arrayofobject
Array of MQTT topic names for publish capability.
publish.topic
string
when[].subscribe
arrayofobject
Array of MQTT topic names for subscribe capability.
subscribe.topic
string
routes[].exit*
string
Next binding when following this route.
routes:
- when:
...
exit: mqtt_kafka_proxy
* required

