mqtt client
mqtt client
The mqtt client binding encodes the MQTT protocol to the outbound network stream.
mqtt_client:
type: mqtt
kind: client
exit: mqtt_client_tcp
Configuration (* required)
options
object
The client
specific options.
options:
authorization:
my_jwt_guard:
credentials:
connect:
username: Bearer {credentials}
versions:
- v5
- v3.1.1
options.authorization
object
as map of namedobject
properties
Authorization by a named guard.
authorization:
my_jwt_guard:
credentials:
connect:
username: Bearer {credentials}
authorization.credentials*
object
Defines how to extract credentials from the MQTT connect packet.
credentials.connect*
object
MQTT connect packet properties
connect.username
string
Extract credentials from the MQTT connect packet username property with {credentials}
, e.g. "Bearer
{credentials}"
.
connect.password
string
Extract credentials from the MQTT connect packet password property with {credentials}
, e.g. "Bearer
{credentials}"
.
routes*
array
ofobject
Conditional mqtt
specific routes.
routes[].guarded
object
as map of namedarray
ofstring
List of roles required by each named guard to authorize this route.
routes:
- guarded:
my_guard:
- 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
The MQTT topic to match on that supports standard MQTT wildcards /+/
, /#
.
when[].subscribe
array
ofobject
Array of MQTT topic names for subscribe capability.
subscribe[].topic
string
The MQTT topic to match on that supports standard MQTT wildcards /+/
, /#
.
routes[].exit
string
Next binding when following this route.
routes:
- when:
...
exit: mqtt_kafka_proxy
exit
string
Default exit binding when no conditional routes are viable.
exit: echo_server
telemetry
object
Defines the desired telemetry for the binding.
telemetry.metrics
array
Telemetry metrics to track
telemetry:
metrics:
- stream.*