mqtt
Pushes messages to an MQTT broker.
- Common
- Advanced
# Common config fields, showing default values
output:
label: ""
mqtt:
urls: [] # No default (required)
client_id: ""
connect_timeout: 30s
topic: "" # No default (required)
qos: 1
write_timeout: 3s
retained: false
max_in_flight: 64
# All config fields, showing default values
output:
label: ""
mqtt:
urls: [] # No default (required)
client_id: ""
dynamic_client_id_suffix: "" # No default (optional)
connect_timeout: 30s
will:
enabled: false
qos: 0
retained: false
topic: ""
payload: ""
user: ""
password: ""
keepalive: 30
tls:
enabled: false
skip_cert_verify: false
enable_renegotiation: false
root_cas: ""
root_cas_file: ""
client_certs: []
topic: "" # No default (required)
qos: 1
write_timeout: 3s
retained: false
retained_interpolated: "" # No default (optional)
max_in_flight: 64
The topic
field can be dynamically set using function interpolations described here. When sending batched messages these interpolations are performed per message part.
Performance
This output benefits from sending multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages (or message batches) with the field max_in_flight
.
Fields
urls
A list of URLs to connect to. If an item of the list contains commas it will be expanded into multiple URLs.
Type: array
# Examples
urls:
- tcp://localhost:1883
client_id
An identifier for the client connection.
Type: string
Default: ""
dynamic_client_id_suffix
Append a dynamically generated suffix to the specified client_id
on each run of the pipeline. This can be useful when clustering Bento producers.
Type: string
Option | Summary |
---|---|
nanoid | append a nanoid of length 21 characters |
connect_timeout
The maximum amount of time to wait in order to establish a connection before the attempt is abandoned.
Type: string
Default: "30s"
Requires version 1.0.0 or newer
# Examples
connect_timeout: 1s
connect_timeout: 500ms
will
Set last will message in case of Bento failure
Type: object
will.enabled
Whether to enable last will messages.
Type: bool
Default: false
will.qos
Set QoS for last will message. Valid values are: 0, 1, 2.
Type: int
Default: 0
will.retained
Set retained for last will message.
Type: bool
Default: false
will.topic
Set topic for last will message.
Type: string
Default: ""
will.payload
Set payload for last will message.
Type: string
Default: ""