Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
When subscribing to topics with retain flag set, the mqtt connector can receive all retained messaged since last connection.
Under the broker section in the mqtt json configuration file, two keys have been introduced for MQTT v5.
cleanStart which must be false for the buffering to work and
sessionExpiryInterval which must be greater than 0.
The above functionality is relevant for retained mqtt topics that include a timestamp such as:
{"temperature" : 23, "timestamp": 1721233307943}
Please note:
Although the above changes work when executing the gateway locally from source, they do not work when executing the gateway using docker. To my understanding, the issue is related to the mqtt connection of the gateway to thingsboard when publishing received messages.
When subscribing to topics with retain flag set, the mqtt connector can receive all retained messaged since last connection. Under the broker section in the mqtt json configuration file, two keys have been introduced for MQTT v5.
Example configuration for MQTT v5:
When using MQTT v3, similar behavior can be achieved with:
The above functionality is relevant for retained mqtt topics that include a timestamp such as:
Please note: Although the above changes work when executing the gateway locally from source, they do not work when executing the gateway using docker. To my understanding, the issue is related to the mqtt connection of the gateway to thingsboard when publishing received messages.