dotnet / MQTTnet

MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
MIT License
4.44k stars 1.06k forks source link

Can support save session to disk or database #2065

Open daliuzhen1 opened 1 month ago

daliuzhen1 commented 1 month ago

Describe the feature request

Can support save session to disk or database, and reload the session data and message from database or disk after broker restart. Certainly, it should also recover the _unacknowledgedPublishPackets from database if set cleanSession to false. It is useful for our tolerance design

Which project is your feature request related to?

Describe the solution you'd like

Load the session data and put them into MqttSessionsStorage class.

Describe alternatives you've considered

Additional context

image

image

PontusHolmberg commented 1 month ago

Yes please. That would be a work around for my memory issue (#1836)