You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#22 relies on the assumption that after the first connection, a MQTT session for the device is always present, as we never ask for a clean session.
However, the assumption does not hold when Astarte disconnects the device. In that case, the current automatic reconnection mechanism does not perform the required Astarte MQTT v1 steps (publishing introspection/emptycache/properties), and so the device enters a reconnection loop.
Relevant SDK logs using the example code:
Received error: EOF
Device connection state: false
Sending old messages with non-discard retention
Device connection state: true
Sending old messages with non-discard retention
Received error: EOF
Device connection state: false
Sending old messages with non-discard retention
Device connection state: true
Sending old messages with non-discard retention
Received error: EOF
...
The text was updated successfully, but these errors were encountered:
Send introspection/emptycache/properties independently of sessionPresent flag.
This allows to perform the initialization steps of the Astarte MQTT v1 protocol
when the MQTT connection has been closed by the server.
Temporairly fixesastarte-platform#31.
Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
Annopaolo
added a commit
to Annopaolo/astarte-device-sdk-go
that referenced
this issue
Jan 20, 2022
Send introspection/emptycache/properties independently of sessionPresent flag.
This allows to perform the initialization steps of the Astarte MQTT v1 protocol
when the MQTT connection has been closed by the server.
Temporarily fixesastarte-platform#31.
Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
…ection
Send introspection independently of sessionPresent flag whenever the device connects or reconnects.
EmptyCache and stored properties are resent only if a new MQTT session is used.
Temporarily fixesastarte-platform#31.
The definitive fix will revise the autoreconnection mechanism as a whole.
Signed-off-by: Arnaldo Cesco <arnaldo.cesco@secomind.com>
#22 relies on the assumption that after the first connection, a MQTT session for the device is always present, as we never ask for a clean session.
However, the assumption does not hold when Astarte disconnects the device. In that case, the current automatic reconnection mechanism does not perform the required Astarte MQTT v1 steps (publishing introspection/emptycache/properties), and so the device enters a reconnection loop.
Relevant SDK logs using the example code:
The text was updated successfully, but these errors were encountered: