Publish
Produce message in a MQTT topic
type: "io.kestra.plugin.mqtt.Publish"
id: mqtt_publish
namespace: company.team
tasks:
- id: publish
type: io.kestra.plugin.mqtt.Publish
server: tcp://localhost:1883
clientId: kestraProducer
topic: kestra/sensors/cpu
serdeType: JSON
retain: true
from:
type: "sensors"
value: 1.23
id: mqtt_publish
namespace: company.team
tasks:
- id: publish
type: io.kestra.plugin.mqtt.Publish
server: ssl://localhost:8883
clientId: kestraProducer
topic: kestra/sensors/cpu
crt: /home/path/to/ca.crt
serdeType: JSON
retain: true
from:
type: "sensors"
value: 1.23
A client identifier that is unique on the server being connected to
A client identifier clientId must be specified and be less that 65535 characters. It must be unique across all clients connecting to the same server. The clientId is used by the server to store data related to the client, hence it is important that the clientId remain the same when connecting to a server if durable subscriptions or reliable messaging are required. As the client identifier is used by the server to identify a client when it reconnects, the client must use the same identifier between connections if durable subscriptions or reliable delivery of messages is required.
Source of message send
Can be an internal storage uri, a map or a list.
Serializer / Deserializer used for the payload
The address of the server to connect to, specified as a URI
The serverURI parameter is typically used with the the clientId parameter to form a key. The key is used to store and reference messages while they are being delivered.
The address of the server to connect to is specified as a URI. Two types of connection are supported tcp://
for a TCP connection and ssl://
for a TCP connection secured by SSL/TLS. For example:
tcp://localhost: 1883
ssl://localhost: 8883
If the port is not specified, it will default to 1883 fortcp://
" URIs, and 8883 forssl://
URIs.
Topic where to send message
The MQTT version to use.
The Authentication Method.
Only available if version
= V5
If set, this value contains the name of the authentication method to be used for extended authentication. If null, extended authentication is not performed.
The connection timeout.
This value defines the maximum time interval the client will wait for the network connection to the MQTT server to be established. The default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.
Server certificate file path.
The password to use for the connection.
The user name to use for the connection.
Number of message published