Skip to content

Split live-status tracking into its own subscriber (and share one MQTT connection) - Part 1: Add attachClient/detachClient#7843

Open
n-lark wants to merge 6 commits into
mainfrom
7608-mqtt-shared-connection
Open

Split live-status tracking into its own subscriber (and share one MQTT connection) - Part 1: Add attachClient/detachClient#7843
n-lark wants to merge 6 commits into
mainfrom
7608-mqtt-shared-connection

Conversation

@n-lark

@n-lark n-lark commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Adds attachClient/detachClient to the MQTT service so multiple subscribers can share one connection per key. Reused while anyone's attached, torn down only when the last detaches. createClient/destroyClient are unchanged and nothing uses attach/detach yet.

Related Issue(s)

Relates to #7608

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.61%. Comparing base (2eeedc9) to head (e01772b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7843   +/-   ##
=======================================
  Coverage   75.61%   75.61%           
=======================================
  Files         432      432           
  Lines       23035    23035           
  Branches     6107     6107           
=======================================
  Hits        17417    17417           
  Misses       5618     5618           
Flag Coverage Δ
backend 75.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cstns cstns left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Please rename the attached to something more explicit

Comment thread frontend/src/types/services/mqtt.types.ts Outdated
Comment thread frontend/src/services/mqtt.service.ts Outdated
@n-lark
n-lark requested a review from cstns July 17, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants