FlowFuse / nr-project-nodes

A set of Node-RED nodes for inter-project communication within the FlowFuse platform
Apache License 2.0
5 stars 0 forks source link

Add a 2 minute session expiry on the mqtt connection #69

Closed knolleary closed 2 months ago

knolleary commented 2 months ago

Fixes #68

This updates the project nodes to connect with a non-clean session, meaning session state is not immediately expired when the node disconnects. Alongside this, setting the session expiry to 2 minutes so we don't queue up messages indefinitely.

The choice of a 2 minute session expiry means we'll handle brief connectivity blips without discarding messages.

If the project nodes are disconnected for more than 2 minutes, we'll stop queuing up messages for it (something we didn't do at all previously).

Steve-Mcl commented 2 months ago

pulling and testing with e2e flows that operate across the broker.