Documentation

c-treeEDGE IoT Database

Previous Topic

Next Topic

Configuring MQTT Persistence for c-treeEDGE

Several of the configurations supported by c-treeEDGE use MQTT. When using c-treeEDGE with MQTT, it is necessary to configure MQTT.

These instructions are based on the assumption that you have downloaded c-treeEDGE and installed it on the same machine as the application. See Installing the c-treeEDGE MicroServer.

They also assume you have followed the directions elsewhere in this chapter to configure your environment. See one of the following:
Installing and Configuring the c-treeEDGE MQTT ThingWorx Extension
Node-RED Using the c-treeEDGE MQTT Broker
Python and c-treeEDGE MQTT

The figure below shows a typical application that uses MQTT to communicate with the cloud (the application could be built using ThingWorx, Node-RED, or a custom environment):

Notice that data from the application passes through a c-treeEDGE MQTT Broker. This broker can replace a generic MQTT broker. MQTT uses System Topics to control operation. You will configure those System Topics to enable persistence on the edge.

Configure c-treeEDGE

c-treeEDGE comes pre-configured to work out-of-the-box. MQTT persistence support is provided by the httpd plug-in module. If you want to review current MQTT settings, open and edit c-treeEdge.<platform>\server\config\cthttpd.json and examine the mqtt_* attributes.


{

"listening_https_port": 8443,

"ssl_certificate": "./web/fccert.pem",

"document_root": "./web/apps",

"mqtt_enabled": true,

"mqtt_listening_port": 1883,

"mqtt_persistence_enabled": true,

"mqtt_log_enabled": false,

"applications": [

"mqtt;ctMQTT.dll",

"ctree;ctREST.dll"

]

}

TOCIndex