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
Owntracks seems to re-issue subscriptions for a persistent mqtt session even when the protocol version is set to 4 (3.1.1) and the 'session present' flag is set in the CONNACK
This is a shame as it generates a lot of traffic on an unreliable connection
Thanks.
App build number: 2.5.3 (420503003)
Android version: 14
Device: Xiaomi/Redmi Note 12
Installation source: Google Play
The text was updated successfully, but these errors were encountered:
It's a good shout - we always re-subscribe on reconnect.
The problem with only doing that when cleanSession=true is that if the broker is not persisting state, if the broker restarts, then it'll lose the session and no messages will be received by OT until it explicitly resubscribes. OT has no way of knowing when it reconnects whether or not a broker is holding an existing session, hence we always subscribe.
Could have it as a config setting for people who explicitly want to turn this behaviour off?
Andrew,
I think this problem is fixed in MQTT 3.1.1. The CONNACK has a 'session
present' flag which is only set if you have connected to a valid,
pre-existing session - so no subscribes necessary .
No extra configuration is required because the flag will only ever be set
if 'mqttProtocolLevel' is set to 4.
This will only ever be a issue if you decide to change the default for
mqttProtocolLevel in the future
Thanks
On Sat, 23 Nov 2024 at 19:20, Andrew Rowson ***@***.***> wrote:
It's a good shout - we always re-subscribe on reconnect.
The problem with only doing that when cleanSession=true is that if the
broker is not persisting state, if the broker restarts, then it'll lose the
session and no messages will be received by OT until it explicitly
resubscribes. OT has no way of knowing when it reconnects whether or not a
broker is holding an existing session, hence we always subscribe.
Could have it as a config setting for people who explicitly want to turn
this behaviour off?
—
Reply to this email directly, view it on GitHub
<#1912 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARWEFQEAWCCIE5EIKNIPOYD2CDIPVAVCNFSM6AAAAABRW4WWMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVGYZDOMRZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
Owntracks seems to re-issue subscriptions for a persistent mqtt session even when the protocol version is set to 4 (3.1.1) and the 'session present' flag is set in the CONNACK
This is a shame as it generates a lot of traffic on an unreliable connection
Thanks.
The text was updated successfully, but these errors were encountered: