astarte-platform / astarte_vmq_plugin

Astarte VerneMQ plugin publishes incoming messages on an AMQP exchange with some additional metadata, so they can be processed by other components.
http://astarte-platform.org/
Apache License 2.0
16 stars 10 forks source link

Send a periodic heartbeat for every device to Data Updater Plant #13

Closed rbino closed 4 years ago

rbino commented 4 years ago

There are some corner cases (e.g. VerneMQ restarts and, while restarting, a device disconnects) where Astarte devices are stuck in the connected: true state.

To avoid this, the VerneMQ plugin should send a periodic "heartbeat" to indicate that a device is still connected. DUP will then handle the interruption of the heartbeat as a sign that the device is not connected anymore, and will act accordingly.

bettio commented 4 years ago

See also https://github.com/astarte-platform/astarte/issues/304