MQTT high availability considerations include multi-node clustering, redundant client ingress, and durable or shared session state so that broker or topology failures do not cause the cluster to lose MQTT sessions.
The design applies to production-scale industrial IoT networks using MQTT publish/subscribe, including telemetry, machine state, and operational events routed through topics such as <code>factory/line1/temperature</code> [S3].
What HA MQTT Architecture Must Provide
An MQTT broker is the central message distributor between publishers and subscribers. When the broker is offline, clients cannot communicate through the publish/subscribe path, which makes a standalone broker a single point of failure [S1].
An MQTT broker cluster solves that exposure by presenting multiple broker nodes as one logical broker to connected clients. An MQTT broker cluster operates as one logical broker from a client's perspective and must support network partitions and topology changes without losing MQTT sessions.
MQTT itself does not define data storage, so persistence must be designed separately. High-availability brokers can use shared transient storage to preserve delivery state when a new node joins, a broker restarts, or inter-broker communication synchronizes messages [S2]. MQTT deployments that use persistent sessions require session state to be maintained, but the supplied material does not establish a specific storage requirement for queued QoS 1 or QoS 2 messages across MQTT 3.1.1 and MQTT 5.0.
A client keeps a persistent session by using <code>CleanSession=false</code> in MQTT 3.1.1, or <code>CleanStart=false</code> with a non-zero <code>SessionExpiryInterval</code> in MQTT 5.0. That session includes subscriptions, offline message queues, QoS 2 transaction state, and the client packet-identifier namespace [S4].
Active-Passive Versus Multi-Master Clusters
Active-passive deployment keeps one broker handling production traffic while another node remains synchronized as a standby. This model suits moderate traffic and simplifies the active node's role, but failover depends on the standby being able to take over the full workload [S2].
Multi-master deployment allows multiple brokers to accept client sessions concurrently. Inter-broker communication shares messages between peers, so a publisher connected to one node can reach a subscriber attached to another [S2]. A TCP load balancer distributes connections, routes management traffic where applicable, and provides a single client entry point [S2].
The comparison below addresses failover behavior, traffic distribution, and operational state rather than claiming that one model fits every plant:
For production clusters, load-balancer placement and client ingress need separate failure-domain planning. A TCP load balancer can provide one address for MQTT communication, and some clustered brokers do not require sticky sessions even when persistent sessions are enabled [S1]. Other multi-master designs use TCP stickiness to keep a client on its initial broker while weighted round-robin distributes load across nodes [S2].
Session Persistence and Delivery Guarantees

QoS 1 provides at-least-once delivery and creates the common path for industrial telemetry. A broker matching a publication to a subscription may deliver it immediately, queue it for a disconnected persistent session, and persist it before sending PUBACK when persistence is enabled [S4].
That ordering provides a defined recovery point. If the broker fails after receiving PUBLISH but before PUBACK, the publisher retransmits the message. The supplied material identifies persistence, session management, and failover as architectural concerns for avoiding message loss, but it does not establish a universal disk-backed-survival requirement for a retained message after PUBACK.
QoS 2 provides exactly-once delivery through the four-message sequence PUBLISH, PUBREC, PUBREL, and PUBCOMP. It requires four network round trips and per-message transaction state, making it more expensive than QoS 1 for high-frequency telemetry [S4].
Keep-alive provides a separate failure signal for dead client connections. A client configured with <code>keepAlive=60</code> must send PINGREQ within the negotiated interval to remain connected [S4]. This detects a broken client path, but it does not replace broker clustering because keep-alive does not restore subscriptions, queued messages, or publication state after a server failure.
Application-level sequence numbers or timestamps should accompany QoS 1 telemetry when downstream processing must reject duplicates. The broker provides at-least-once delivery, while the application resolves repeated observations after reconnect or retransmission [S4].
Failure Modes That Plant Tests Must Cover
Broker failure is only one failure mode in a clustered plant network. Network partitions can separate nodes even while each individual process remains healthy, and a cluster that cannot tolerate partitions cannot combine partition tolerance with uninterrupted service [S1].
Session migration and topology changes create a second test case. A cluster must retain MQTT sessions while nodes join or leave, because losing session state defeats the purpose of persistent subscriptions [S1]. The test should remove one node, confirm client reconnection, and verify that queued QoS 1 messages reach the intended subscriber.
Persistent storage and inter-broker synchronization create a third failure mode. Shared transient storage is specifically needed when a node joins, a broker restarts, or inter-broker communication synchronizes messages [S2]. Validation should therefore include broker restart, node replacement, storage interruption, and controlled partition tests rather than relying only on a load-balancer health check.
Capacity is the fourth constraint. One operating recommendation is to keep each node at 60–70% load capacity so it can absorb failover work without overloading the remaining cluster [S2]. This is an engineering operating margin, not a universal MQTT requirement, and must be checked against the broker's measured connection, message, and storage limits.
Deployment Models for Plant Networks

Industrial MQTT deployments can be self-hosted, managed, or hybrid. Self-hosting gives plant engineers control over broker placement, persistence, network paths, and failover behavior. Managed services reduce infrastructure administration but constrain topology and operating choices. Hybrid deployments place local brokers near plant equipment while using centralized platforms for aggregation or analytics [S3].
Container orchestration can run several Mosquitto instances, but Kubernetes Service routing alone does not prove end-to-end availability. A Deployment manages replacement pods, while an additional failover controller can be used to select a primary and reduce takeover delay [S5].
For an IIoT plant, local brokers are often the stronger choice when disconnected operation and deterministic recovery matter. Central brokers fit analytics platforms where the plant network is stable and the operating model accepts the provider's architecture. Managed or hybrid brokers fit organizations that need centralized administration more than unrestricted infrastructure control [S3].
The architecture should also keep plant control traffic separate from broad enterprise connectivity where practical. Edge gateways can maintain local MQTT access, while a controlled uplink connects the plant to cloud or data-center services. That arrangement limits the impact of an external network outage on field communication [S3].
Security, Observability, and Sourcing Decisions
MQTT client connections can use TCP, TLS, or WebSocket transports. Industrial deployments should protect broker access with TLS encryption, authentication based on credentials, tokens, or OAuth, and topic-level authorization controls [S2][S3].
MQTT over TLS commonly uses port 8883 [S2]. Port assignment alone is not a security control, so plant teams must also restrict listener exposure, rotate credentials, define administrative access, and verify publisher and subscriber permissions by topic.
Cluster monitoring must cover more than process liveness. Functional redundancy monitoring evaluates node availability and broker responsiveness, which helps identify a node that is running but not serving traffic effectively [S2]. Operational dashboards should track connection counts, publish and subscribe rates, queue depth, storage errors, retransmissions, node health, and failover events.
MQTT quality-of-service levels, client identifier rules, session state, keep-alive behavior, and retained-message handling are defined by the MQTT specification. Network segmentation and broker security must be mapped to the applicable plant cybersecurity program rather than assigned to an unrelated standard. A broker, load balancer, and storage layer should therefore be reviewed as one system rather than three independently approved products.
Acceptance Tests for an HA Plant Broker

A production acceptance test should demonstrate that losing one broker node does not interrupt message flow, persistent sessions survive, and queued messages reach subscribers after clients reconnect. The test result should include the measured failover time and the time required for a client to reconnect to a healthy node. [S4]
Track two signals before and after each failure drill: client-visible message loss or duplication, and the interval between the failed node's removal and restored service. A second drill should remove a network path between nodes, confirming the selected behavior under partition rather than treating a node-failure test as complete HA evidence.
The closing specification is straightforward: multiple broker nodes, resilient client ingress, durable session and message state, inter-node synchronization where required, and measured capacity for 100% service takeover. For dense plant telemetry, MQTT QoS 1 with application deduplication is usually the practical balance; QoS 2 should be reserved for traffic whose duplicate side effects justify its four-message handshake and state overhead [S4].