Compare regular fan-out with MQTT shared subscriptions. A matching publication is delivered to every matching non-shared subscription, but to only one session inside each matching shared subscription group. The broker chooses the session; round-robin is a common policy, not a protocol guarantee.
TryCreate $share/workers/devices/+/events/# with 3 workers, send a 6-message Publish burst, and compare Round-robin with Least backlog.
ObserveRegular fan-out delivers each message 3 times, but Shared group selects 1 worker per matching publication; Slow worker builds backlog under round-robin.
ExplainAcross 3 workers, the $share prefix groups identical Topic Filters so the broker load-balances each matching message to 1 session; worker selection remains broker-specific.
Technical boundariesThe model omits QoS redelivery after worker failure, ordering guarantees, session expiry, receive maximum, cross-node group coordination, sticky-policy collisions, ACLs, and broker persistence.
The topic filter part can use normal MQTT wildcards.
Delivery rule
A regular subscription gets its own matching copy.
A shared group gets one matching copy per publication.
Different shared groups receive independent copies.
Broker policy
The spec defines the shared-group behavior, not a required balancing algorithm.
Round-robin, least backlog, and sticky policies are broker choices.
Ordering across the whole group is not the same as one subscriber seeing all messages.
Technical accuracy notes
Session, not process
The broker selects among subscribing sessions. In practice those sessions often map to worker processes or service instances, but MQTT specifies session behavior.
Matching comes first
The publication topic still has to match the topic filter after the share prefix and share name are removed. Shared subscriptions do not change MQTT topic matching rules.
QoS remains per subscription
Shared subscriptions load-balance delivery. They do not replace QoS handshakes, retained-message semantics, or application-level idempotency.