In order to stock the MQTT messages we suggest using a sqlite file with the option “commit every 1 row” as per below. Like this Anatella writes directly on the disk we’re sure to not “loose” anything (even in case of power outage. However, this may slow down a slightly the graph and therefore we may be tempted to commit every 50 rows instead.
In QOS2, to make sure to not loose any message sent by the broker, we can configure Anatella to not send the final “acknowledge” (named “PUBCOMP”) until the row has been totally dealt with by the graph (i.e. usually has been written into the sqlite file)
For the QoS1, the acknowledged message is here called (PUBACK) we could add this option in order to have the same behavior, but we do not because the delay caused by expecting the PUBACK would slow down, unproperly configured, brokers.