MQTT Box best way to store messages and QOS2/ QOS1 config recommendation?

jean-marc

New member
Hi, getting IOT messages from a broker what would be the best format to store them and how to configure the box to not lose any?

JM
 

Support

Administrator
Staff member
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.
mqtt1.png


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)

mqtt2.png


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.
 
Top