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
This forces the user of this library to properly disconnect in order to not leave open sessions (possibly indefinitely) on the broker.
Especially in a cloud situation, on kubernetes, but also in cases of crashes, this might clump up the broker with stale sessions, which even further (when using shared subscriptions) may cause messages to get lost, in certain configured situations.
Does the explicit handling of the clean_session flag outside of the control of the user of the library have any deeper function, or could we maybe make it configurable, giving the control back to the user?
The text was updated successfully, but these errors were encountered:
This will be left up to the user in the upcoming MQTT 5 version of Tortoise—sorry it takes a while. This is a spare time project, and 2019 was a year where I had other interests and other work to do, but I am trying to get the MQTT 5 version done, and that will change everything.
The clean_session flag is not possible to be configured in this library. A user will have to live with the decisions made in the code.
https://github.com/gausby/tortoise/blob/master/lib/tortoise/connection.ex#L47
Here it is set to true, meaning "please do clean the session after disconnect, not leaving any remnants in the broker".
https://github.com/gausby/tortoise/blob/master/lib/tortoise/connection.ex#L628
Here it is set to false, meaning "please keep my session indefinitely in the broker".
This forces the user of this library to properly disconnect in order to not leave open sessions (possibly indefinitely) on the broker.
Especially in a cloud situation, on kubernetes, but also in cases of crashes, this might clump up the broker with stale sessions, which even further (when using shared subscriptions) may cause messages to get lost, in certain configured situations.
Does the explicit handling of the clean_session flag outside of the control of the user of the library have any deeper function, or could we maybe make it configurable, giving the control back to the user?
The text was updated successfully, but these errors were encountered: