The device is installed on board, there will be no network situation. So you need to realize that after the network reconnection, the data of the disconnection time period should also be sent out, I wonder if MQTT itself has such a message flag bit function, or there is no other way to achieve this function? The data itself is first deposited into the database, and then sent after being removed from the database.
The flow shown in this post may be useful to you. It provides guaranteed delivery of MQTT messages to the broker. It can save messages over a reboot or node-red restart if required.
Thank you so much for your reply, I think this article will have the answers I need and I will read it carefully!
One thing to watch out for with it is that you may occasionally have the same message published more than once (it is virtually impossible to stop that from ever happening), so you must make sure that the system subscribing to the topics can cope with repeated messages. On one system I had where that was a problem I added a timestamp into the message so that I could ignore repeated messages.
Thank you very much for your advice, I have followed this thread and can always receive new news.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.