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

Recover the session status from somewhere else #1671

Open Y-Sindo opened 1 year ago

Y-Sindo commented 1 year ago

Describe the feature request

We want to implement a cluster with high availability based on MQTTnet. Sometimes we need to close a pod and migrate all the client sessions to another pod. However, we cannot restore client sessions in the MqttServer class.

Which project is your feature request related to?

Describe the solution you'd like

I find the class PreparingSessionEventArgs which seems related to this feature, but the class is not used. Look forward to the finalizing of this feature.

Describe alternatives you've considered

Do the session management on my own.

ethankershaw commented 1 year ago

I'm interested in this as well. The event hooks for managing retained messages enable persisting the single latest retained message per topic, but I'm also wanting to queue messages for a client to receive while they have not been connected (https://www.hivemq.com/blog/mqtt-essentials-part-7-persistent-session-queuing-messages/).

Related #1660 and #1663

sant11h commented 1 year ago

I'm also interested in this feature, bump!