MQTT Broker Design for HVAC BMS Integration Guide

By James Smith on October 15, 2026

mqtt-broker-design-for-hvac-bms-integration-guide

MQTT looks simple from the outside, publish a message, subscribe to a topic, done, which is exactly why so many building telemetry deployments run into trouble once they scale past a pilot. A flat or inconsistent topic hierarchy turns into a maintenance headache once a portfolio reaches dozens of buildings, and the wrong QoS level either floods the broker with unnecessary traffic or silently drops readings that mattered. Getting the topic structure, retained-message strategy and QoS levels right from the start saves a painful redesign later, and teams can review their own broker design in a short session.

BMS/BAS + CMMS Integration · MQTT Architecture

A Topic Hierarchy That Scales Past One Pilot Building

iFactory designs MQTT broker architecture around a consistent topic structure, so adding the hundredth building is as clean as the first.

site/
building-14/
floor-3/
ahu-2/
supply-temp
fan-status
vav-12/
zone-temp

Why Topic Structure Is the Decision That Compounds

A messy topic hierarchy is tolerable with ten devices and painful with ten thousand. Every subscriber, dashboard and automation rule built against the structure has to be rewritten if the hierarchy changes later.

A consistent site/building/floor/equipment/point pattern, decided once, lets new buildings plug into existing dashboards and rules without custom work for each one.

QoS LevelGuaranteeBest ForTradeoff
QoS 0At most once, no acknowledgmentHigh-frequency sensor readingsMessage loss possible under network stress
QoS 1At least once, possible duplicatesAlarm and alert messagesSubscriber must handle duplicate delivery
QoS 2Exactly once, full handshakeCritical commands and setpoint changesHigher broker and network overhead
Using QoS 2 everywhere feels safest and is usually the wrong call. It adds overhead to messages, like routine temperature readings, that don't need the guarantee.

Get Your Topic Hierarchy Reviewed Before You Scale

Book a 30-minute session and iFactory will review your current MQTT structure against a portfolio-scale design.

Topic Hierarchy Design Principles

1

Consistent Depth and Order

Every topic follows the same site/building/floor/equipment/point pattern, so wildcards and dashboards work uniformly.

2

Stable Equipment Identifiers

Equipment IDs in the topic path should not change when equipment is physically relocated or renamed in the BAS.

3

Separate Command and Status Topics

Commands sent to equipment and status reported back use distinct topic branches to avoid confusing the two directions.

4

Plan for Wildcarding Early

A structure designed for single-level and multi-level wildcard subscriptions makes building-wide dashboards far simpler to build.

Retained Message Strategy

Retained messages let a new subscriber get the last known value immediately on connecting, which matters for dashboards that shouldn't show blank values while waiting for the next publish cycle.

Use retained for
Current equipment status and last known setpoint.Why: a dashboard loading mid-cycle still shows a meaningful value immediately.
Avoid retained for
High-frequency trend data and transient alarm events.Why: retaining every reading wastes broker memory and can confuse a subscriber expecting a fresh event.

Signals Your Broker Design Needs Attention

Watch for
Adding a new building requires custom dashboard work.Reading: the topic hierarchy isn't consistent enough to scale cleanly.
Watch for
The broker shows rising memory use as buildings get added.Reading: retained message policy likely needs tightening.
Watch for
Alarms occasionally arrive late or get missed.Reading: alarm topics may be running at a QoS level too low for their importance.

Where iFactory Fits

iFactory designs and operates MQTT broker architecture built for portfolio scale from the first building onward.

Portfolio-Scale Topic Design

A consistent hierarchy is established before the first building connects, so every subsequent one plugs in cleanly.

QoS Tuned by Message Type

Routine readings, alarms and commands each get the QoS level appropriate to their importance, not a blanket setting.

Retained Message Governance

Retained flags are applied selectively, keeping broker memory use predictable as the portfolio grows.

Broker Scaling and Monitoring

Broker capacity and health are monitored continuously as building count and message volume increase.

Delivered turnkey, live in 6–12 weeks
iFactory arrives pre-configured with a scalable MQTT broker architecture ready to extend across your portfolio. Scope covers topic hierarchy design, QoS and retained message policy, BAS integration, team training and 24×7 remote monitoring.
Weeks 1–4
Design the topic hierarchy and connect pilot buildings
Weeks 5–8
Set QoS and retained message policy by message type
Weeks 9–12
Go live and extend the structure across the portfolio
Integration engineer: why is the broker's memory climbing every week?
iFactory: several trend topics were set to retained unnecessarily, that policy was corrected during the review.
Expert Review

Reviewed by iFactory's Integration Architecture team for alignment with current MQTT broker design practice. The topic structure and QoS guidance here are general patterns; actual design should account for your specific broker platform, message volume and existing naming conventions.

Frequently Asked Questions

Can we change our topic hierarchy after buildings are already connected?

Yes, but it requires coordinated updates to every subscriber, dashboard and rule referencing the old structure, which is why getting the hierarchy right before scaling matters so much. Support can help plan a hierarchy migration if needed.

How many levels deep should a topic hierarchy go?

It depends on your portfolio structure, but five levels, roughly site, building, floor, equipment and point, covers most commercial HVAC deployments without becoming unwieldy.

Does QoS 2 guarantee a message is never lost?

QoS 2 guarantees exactly-once delivery under normal broker operation, but it adds meaningful overhead, so it should be reserved for messages where that guarantee is worth the cost, like critical commands. See QoS tuning applied to your own message types in a short session.

What broker platforms does this work with?

The topic structure and QoS principles are broker-agnostic and apply across common MQTT broker platforms, though specific configuration steps vary by platform.

How does this affect dashboard and automation rule development?

A consistent hierarchy lets dashboards and rules use wildcard subscriptions that automatically pick up new buildings, instead of requiring custom work per site. Ask support how this simplifies your dashboard rollout.

Design the Broker Once, Scale It to Every Building

iFactory builds MQTT architecture that scales cleanly from one pilot building to an entire portfolio. Book a walkthrough on your own design.


Share This Story, Choose Your Platform!