luamqttc
luamqttc copied to clipboard
How to reconnect
Hi, does it can reconnect server automatic?
do reconnect when you get error by modify client.lua local assert function.
Let it crash ;-) This experience some how comes from Erlang.
In our production environment, which is mqtt client for Openwrt
, subscriber client is supervised by runit
. When client disconnects/crashes, it will be automatically restarted. And as publisher, we send message out on new connection.
For us, this pattern works stable and well. Hope it helps.
Hey, my suggestion is that it will be better to reconnect when connect lost by manually