luamqttc icon indicating copy to clipboard operation
luamqttc copied to clipboard

How to reconnect

Open aokihu opened this issue 7 years ago • 3 comments

Hi, does it can reconnect server automatic?

aokihu avatar Nov 10 '17 23:11 aokihu

do reconnect when you get error by modify client.lua local assert function.

damody avatar Nov 12 '17 13:11 damody

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.

Yongke avatar Nov 13 '17 01:11 Yongke

Hey, my suggestion is that it will be better to reconnect when connect lost by manually

aokihu avatar Nov 27 '17 09:11 aokihu