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
When the connection is established to the broker and there are messages queued the library sends them all immediately upon connection. When there are a significant number of queued messages and a cellular link is in use this appears to saturate the link resulting in the connection dropping. In addition this can result in significant numbers of out-of-order packets (not that order is guaranteed when resuming from a store).
Having performed some tests it appears that limiting the number messages in flight can significantly reduce these issues. This appears particularly bad when code is running on low power routers; I run a fair number of Teltonika rut955's and resuming on these after an outage is particularly slow (but resolved when in flight messages reduced).
As such I'll raise a PR to add a new option SetMaxResumePubInFlight that will ensure that only the resume function will only send the specified number of messages simultaneously (it will wait for the relevant ACK's before sending the next one).
Note: It would be nice to have a global MaxInFlight option but I don't currently have time to implement that (it would be a much larger change).
The text was updated successfully, but these errors were encountered:
MattBrittan
added a commit
to ChIoT-Tech/paho.mqtt.golang
that referenced
this issue
Jul 19, 2021
When the connection is established to the broker and there are messages queued the library sends them all immediately upon connection. When there are a significant number of queued messages and a cellular link is in use this appears to saturate the link resulting in the connection dropping. In addition this can result in significant numbers of out-of-order packets (not that order is guaranteed when resuming from a store).
Having performed some tests it appears that limiting the number messages in flight can significantly reduce these issues. This appears particularly bad when code is running on low power routers; I run a fair number of Teltonika rut955's and resuming on these after an outage is particularly slow (but resolved when in flight messages reduced).
As such I'll raise a PR to add a new option
SetMaxResumePubInFlight
that will ensure that only the resume function will only send the specified number of messages simultaneously (it will wait for the relevant ACK's before sending the next one).Note: It would be nice to have a global
MaxInFlight
option but I don't currently have time to implement that (it would be a much larger change).The text was updated successfully, but these errors were encountered: