MQTT - v5 Generic over SSL
5 min
overview the mqtt ssl integration enables edge system to connect to the mqtt v5 broker over ssl supported versions compatible with mqtt protocol version 3 1 0 , 3 1 1 , and 5 0 0 supported communication outbound (publish data from edge to mqtt broker) yes inbound (subscribe data from mqtt broker to edge) yes configurations variable detail required name connector name yes hostname ip address or server fqdn of mqtt broker (must be reachable from edge system) yes port mqtt broker port yes ca certificate it is a digital certificate issued by a trusted certificate authority and is used to authenticate the identity of servers or entities in an ssl/tls connection no certificate ssl certificate no private key ssl certificate private key no client id unique client identity yes username user name no password user password no qos the quality of service (qos) level represents an understanding between the message sender and receiver, outlining the assurance of message delivery for a particular message simultaneously publishing multiple messages can enhance throughput, but opting for higher values may increase the risk of message loss, even when qos is set to 1 please note that the actual qos options available may vary based on the server configuration yes parallel publish count it refers to the number of messages that can be simultaneously published or sent in parallel it is a measure of how many messages can be transmitted at the same time as an example, in mosquitto, you have the following settings max queued messages (default 100) max queued bytes (default 0) as per the mosquitto documentation, when this limit is reached, any additional messages are silently discarded you have the option to either adjust the server configuration or specify this value based on the server settings yes integration topic default topic for publishing (support dynamic topic publishing, please refer to format directive section below) no response topic response topic for request/response messages in mqtt v5 no payload format indicator payload format indicator to indicate the format of the payload for connect and publish mqtt packets allowing the server to understand packet without having to operate on the actual data yes content type content type is a utf 8 encoded string that describes the content of the application message, which helps the receiver understand how to parse the application message payload no topic alias maximum maximum number of topic alias allowed decrease the size of the mqtt packet overhead by allowing the topic name to be abbreviated to a small integer yes lwt topic it refers to the specific topic where the last will message will be published no lwt payload it is the information or message that will be sent to the specified topic when the client disconnects unexpectedly or goes offline without sending a proper "goodbye" message no lwt payload type a payload type (raw string or base64 encoded bytes) for last will and testament feature of mqtt no lwt qos a qos value for last will and testament feature of mqtt no lwt retained if enabled, the broker will store the lwt message, and any new subscribers to the lwt topic will immediately receive this retained lwt message no will delay interval add the ability to specify a delay between the end of the connection and sending the will message no session expiry interval the number that specifies how long a broker keeps a client's session information no message expiry interval allow an expiry interval to be set when a message is published no user properties user defined properties that allow users to add their metadata to mqtt messages and transmit additional user defined information no request response info enable to receive response info on request topic no request problem info enable to receive problem info on request topic no throttling limit set a limit on the number of outbound messages per second if sending data to a server that has restrictions on the rate of incoming messages, this ensures that no messages are lost no persistent storage if enabled, messages in the outbound queue are stored on disk if there are interruptions in connection or power loss, messages will be retained and eventually sent when the connection is restored no queue mode select the sequence of data transfer fifo or lifo selecting fifo (first in first out) will send the earliest message first selecting lifo (last in first out) will send the latest message first no persistent storage size limit set the size limit for storing persisted data in mb no keep alive enter the keep alive duration in seconds it is a mechanism to ensure that an litmus edge mqtt integration and mqtt broker connection remain active even if no data is transmitted mqtt 5 0 protocol, for clients with keep alive enabled, if the server does not receive an mqtt control packet from the client within 1 5 times the keep alive duration, it must close the network connection with the client no connection timeout enter the duration to wait for a connection timeout in seconds no format directives symbol definition context $ special character indicate a variable character follows a variable represents some dynamic string value supported variables defined as follows $s additional alias definition from connector settings $d device name from devicehub tag $n tag name from devicehub tag $r raw tag type from devicehub tag $p tag description from devicehub tag $h hostname from os % special character indicating a function character follows a function represents some action to be taken on the next variable supported functions defined as follows %l lowercase() apply to next variable %u uppercase() apply to next variable format directives notes to use a special character in its literal form, enter symbol twice ($$ > $, %% > %) example $$$d %%$n" > "$deviceabc %tagxyz compatibility validation this information is just for reference more products and versions may be supported provided they are compatible with the supported version as mentioned above product , version , date