simon622/mqtt-sn

Cluster support

Opened this issue · 0 comments

Should have the ability to synchronise connections across VMs. The state that would need to be synchronised is as follows;

Client Id
Outbound messages queue
Subscriptions
Will data
Last seen
Session expiry interval
Max packet size
Retain behaviour (from CONNECT)

The cluster service gets notified upon new client side connection of the connecting clientId. If cleanStart = false then the state from existing session in the cluster should be synchronised to local connected gateway. If cleanStart is true the cluster still needs to be notified to clean up state held elsewhere.

If a connection is ACTIVE or SLEEPING on another node in the cluster, it should be terminated and removed after synchronisation occurs.