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

Use shared subscriptions where appropriate for HA support #29

Closed knolleary closed 1 year ago

knolleary commented 1 year ago

Description

Updates the project nodes to use a shared subscription where appropriate to enable HA support.

All subscriptions (except link call response topic) now uses a shared subscription. The group id of the share is set to the project id.

The link call response topic now includes a randomly generated (per-node) string appended to res-. For this to work, that string is also passed in the messageEvent property of the published message. That allows the returning node to reconstruct the appropriate topic to send the reply to.

This all requires a FlowForge platform instance that includes https://github.com/flowforge/flowforge/pull/2225

This feature should be published with a major version bump to ensure existing installs of FF do not pick this change up.

knolleary commented 1 year ago

@Steve-Mcl I've updated the nodes to only use shared subs if the settings file sets a flag called useSharedSubscriptions.

This will mean devices continue to use regular topics as intended.