How-To Guides
Integration Guides
Generic MQTT Over SSL Integration Guide (Mosquitto)
6min
review the following guide for setting up an integration between manufacturing connect edge and an mqtt broker using mosquitto and ssl authentication mosquitto is a lightweight open source message broker that implements mqtt versions 3 1 0, 3 1 1 and version 5 0 before you begin make sure you install the mosquitto mqtt broker on ubuntu docid taiqilg9fqtds1y1dsw step 1 retrieve contents of ca crt file you will need to retrieve the contents of the ca crt file, so that you can add it to the ca certificate parameter value in the connector you'll configure in step 2 to retrieve the contents of the ca crt file go to the ubuntu system open your home directory using the files app open the ca crt file if you see the message could not display "ca crt" , click cancel right click the ca crt file and select open with other application select view all applications select text editor and click select copy the entire contents of the file step 2 add generic mqtt over ssl connector follow the steps to add a connector docid\ m2nifnaadyphcvzwmcoto and select the mqtt generic over ssl provider configure the following parameters name a recognizable name to identify the connector hostname since mosquitto is running locally on your pc, enter your ip address port confirm that the default value 8883 is entered ca certificate paste or upload the ca crt file you copied in step 1 certificate (optional) upload the certificate private key (optional) client id enter \<username> with ssl username (optional) password (optional) qos confirm that the default value 0 is entered the quality of service (qos) level is an agreement between the sender of a message and the receiver of a message that defines the guarantee of delivery for a specific message parallel publish count confirm that the default value of 100 is entered the number of messages being published simultaneously once the defined limit has been reached, subsequent messages are silently dropped integration topic enter test lwt topic enter lwttopicname lwt payload enter some lwt payload lwt payload type the payload type for mqtt's last will and testament feature the options are string and base64 lwt qos the quality of service value for mqtt's last will and testament feature lwt retained select this check box to retain the value for mqtt's last will and testament feature throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit persistent storage when enabled, this will cause messages to undergo a store and forward procedure messages will be stored within manufacturing connect edge when cloud providers are online queue mode select the queue mode as lifo (last in first out) or fifo (first in first out) selecting lifo means that the last data entry is processed first, and selecting fifo means the first data entry is processed first step 3 observe the log file to observe the log file return to the ubuntu system open a terminal window if none is open enter sudo tail f /var/log/mosquitto/mosquitto log and press enter to open the log file view the incoming requests step 4 enable the connector after adding the connector, click the toggle in the connector tile to enable it if you see a failed status, you can review the manage connectors docid\ zz28hztqbk7od xsj81o8 and relevant error messages step 5 view the connection in the log file to view the connection in the log file return to the ubuntu system log file enter sudo tail f /var/log/mosquitto/mosquitto log the log file shows the new connection you should see something like this 1576338704 new connection from 192 168 1 15 on port 8883 1576338704 new client connected from 192 168 1 15 as johnsmith with ssl (p2, c1, k2, u'johnsmith')