//tag::ref-doc[]
= MQTT Sink

This module sends messages to MQTT.

==== Payload:

* `byte[]`
* `String`

== Options

The **$$mqtt$$** $$sink$$ has the following options:

//tag::configuration-properties[]
Properties grouped by prefix:


=== mqtt

$$clean-session$$:: $$whether the client and server should remember state across restarts and reconnects.$$ *($$Boolean$$, default: `$$true$$`)*
$$connection-timeout$$:: $$the connection timeout in seconds.$$ *($$Integer$$, default: `$$30$$`)*
$$keep-alive-interval$$:: $$the ping interval in seconds.$$ *($$Integer$$, default: `$$60$$`)*
$$password$$:: $$the password to use when connecting to the broker.$$ *($$String$$, default: `$$guest$$`)*
$$persistence$$:: $$'memory' or 'file'.$$ *($$String$$, default: `$$memory$$`)*
$$persistence-directory$$:: $$Persistence directory.$$ *($$String$$, default: `$$/tmp/paho$$`)*
$$url$$:: $$location of the mqtt broker(s) (comma-delimited list).$$ *($$String[]$$, default: `$$[tcp://localhost:1883]$$`)*
$$username$$:: $$the username to use when connecting to the broker.$$ *($$String$$, default: `$$guest$$`)*

=== mqtt.consumer

$$async$$:: $$whether or not to use async sends.$$ *($$Boolean$$, default: `$$false$$`)*
$$charset$$:: $$the charset used to convert a String payload to byte[].$$ *($$String$$, default: `$$UTF-8$$`)*
$$client-id$$:: $$identifies the client.$$ *($$String$$, default: `$$stream.client.id.sink$$`)*
$$qos$$:: $$the quality of service to use.$$ *($$Integer$$, default: `$$1$$`)*
$$retained$$:: $$whether to set the 'retained' flag.$$ *($$Boolean$$, default: `$$false$$`)*
$$topic$$:: $$the topic to which the sink will publish.$$ *($$String$$, default: `$$stream.mqtt$$`)*
//end::configuration-properties[]

//end::ref-doc[]
