openenergysolutions / openfmb.adapters

OpenFMB Adapters
Apache License 2.0
3 stars 1 forks source link

NATS auto-reconnect #35

Open jadamcrain opened 5 years ago

jadamcrain commented 5 years ago

Report from DTech demo: NATs plugin may not auto-reconnect after broker restart. Simulate this scenario.

corynguyenfl commented 4 years ago

If all NATS servers go down for a long period of time (exceeded re-connect attempt count), NATS client in adapter will close the connection and stop trying to auto reconnect.

Maybe the NATS plugin should detect connection closed event (by listening to close callback) and then handle reconnect itself.