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
array
ofobject
Conditional mqtt
-specific routes.
routes[].guarded
object
as named map ofstring:string
array
List of roles required by each named guard to authorize this route.
routes:
- guarded:
test:
- read:items
routes[].when
array
ofobject
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
array
ofobject
Array of mqtt session properties
session.client-id
string
An MQTT client identifier, allowing the usage of wildcards.
when[].publish
array
ofobject
Array of MQTT topic names for publish capability.
publish.topic
string
when[].subscribe
array
ofobject
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