MQTT Connections

The FRED Desktop comes bundled with additional MQTT nodes called mqttdb available in the Node-RED palette. Unlike the core MQTT nodes, these nodes optionally persist messages in a lightweight local database in case of a lost connection, crash or Node-RED restart. Once the connection is re-established, messages that have been queued will be sent to the configured broker.


To enable persistent storage for input and output messages, click on the appropriate check boxes in the broker configuration. You can change the compaction interval time to compact the internal database and remove deleted messages.


Database files for a connection are stored in the Node-RED directory under the mqttdb directory. These can be safely removed after stopping Node-RED to clear unsent messages.

Connection Status

When using these nodes, messages sent are saved in a database between Node-RED deployments, application restarts and loss of network connectivity. When connectivity is re-established, messages will then be sent to the broker.

The Connection Status section on the Status page will display the number of outgoing messages pending to each MQTT broker. To clear the messages in the database, you can click on the Clear link there.

Known Issues

Next: Roadmap and Feedback