Publisher client
Gateway gw-7 is connected through the load balancer to broker-a.
Trace how an MQTT broker cluster routes publications, survives node failure, and preserves client state.
Trace a publication through a multi-broker MQTT deployment. MQTT defines the client-to-server protocol; clustering, route tables, state replication, and failover policy are broker implementation choices.
Gateway gw-7 is connected through the load balancer to broker-a.
No reconnect is needed in the healthy path.
Accepts the PUBLISH packet and performs topic matching.
Maintains cluster membership and routing state.
Owns the subscriber connection for sensor/gw-7/status.
Available for scale-out or replacement capacity.
broker-a knows the matching subscriber is attached to broker-c.
Session state is available, so reconnects can resume subscriptions when the broker supports it.
Dashboard dash-4 is connected to broker-c and subscribes to sensor/+/status.
Step through connect, subscribe, publish, route match, cluster forwarding, and delivery.
The ingress broker does not need to copy every publication to every node. It needs enough cluster routing state to deliver this matching message to the broker that owns the subscriber session.
A production cluster can appear as one logical MQTT service to clients, but the internal design can be masterless, quorum-based, sharded, bridge-like, or vendor-specific.
If a connected broker fails, affected clients need a new network connection. Whether subscriptions and queued messages resume depends on persistent session state and cluster storage.
Distributed brokers commonly exchange enough routing information to find matching subscriptions. Retained messages, sessions, and durable queues may use separate storage paths.