We are developing a connected product running on an NXP i.MX8 (Linux) platform, and we want to use an MQTT broker as a “unified” message bus for both internal and external communications. Mosquitto appears to be the only MQTT broker suitable for embedded use, offering MQTT bridge mode to synchronize data with an external MQTT broker when the IoT device reconnects.
Could you help clarify the following point:
The internal broker should be able to store all messages (e.g., temperatures) intended for the external broker until the connection is reestablished. The goal is to store all messages until synchronization without overwhelming the IoT device’s RAM, considering that the device may be disconnected for several days or weeks. This allows for retrieving historical data and not just the latest sensor value. However, I don’t understand the difference between file persistence already available in Mosquitto and the “Persistent Queueing” feature of the Pro version.
In the OS version, the persistence feature makes a copy to disc of what is currently in RAM.
This allows you to not lose anything in case of a restart of a broker, but it will still occupy the RAM space.
The main difference between the two is that persistent queueing saves states’ messages, etc., to disk, and those saved to disc get removed from RAM. The persistent queue allows you to configure when and how much should be held on disc and RAM.
Your use case is a great example of how the persistence queue feature in Pro Mosquitto can be beneficial. It helps manage RAM usage efficiently while ensuring that all messages are delivered once the device reconnects.
Is the persistence queue feature in Pro Mosquitto supported by the Persist SQLite Plugin?
And does the OS version utilize the Snapshot Store only (not SQLite)?
Regarding pricing, all information pertains to the cloud, but there is no mention of options for multiple deployments on embedded IoT.
Yes, the persistence queue is supported by Pro Mosquitto persist sqlite.
The 2.0.x releases of OS mosquitto don’t support sqlite, only the snapshot. This might change in a future 2.1 release, but this is not sure yet. But persistence queueing is only part of the Pro Mosquitto version.
If you want to have a conversation around these topics, you can book a call with us here