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.5k stars 1.07k forks source link

Can support save session to disk or database #2065

Open daliuzhen1 opened 3 months ago

daliuzhen1 commented 3 months 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 2 months ago

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