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.
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.
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 Level | Guarantee | Best For | Tradeoff |
|---|---|---|---|
| QoS 0 | At most once, no acknowledgment | High-frequency sensor readings | Message loss possible under network stress |
| QoS 1 | At least once, possible duplicates | Alarm and alert messages | Subscriber must handle duplicate delivery |
| QoS 2 | Exactly once, full handshake | Critical commands and setpoint changes | Higher broker and network overhead |
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
Consistent Depth and Order
Every topic follows the same site/building/floor/equipment/point pattern, so wildcards and dashboards work uniformly.
Stable Equipment Identifiers
Equipment IDs in the topic path should not change when equipment is physically relocated or renamed in the BAS.
Separate Command and Status Topics
Commands sent to equipment and status reported back use distinct topic branches to avoid confusing the two directions.
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.
Signals Your Broker Design Needs Attention
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.
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.







