Skip to content

Shared subscriptions (beta)

Shared subscriptions enable consumer applications to receive messages via MQTT topics.

In the typical MQTT subscription model, every subscribing client gets a copy of each message sent to a specific topic. However, in the case of shared subscriptions, multiple MQTT clients share a single subscription on a broker. This functionality ensures that messages within a topic are effectively distributed among several clients, leading to enhancedload balancing and fault tolerance within an MQTT system.

In essence, shared subscriptions offer a streamlined approach to integrate backend systems with MQTT.

To use Shared Subscriptions, clients subscribe to a Shared Subscription’s topic filter as follows:

EventTypeTopic Format
Lifecycle$share/{ConsumerGroupName}/iot-lifecycle-{GroupId}
Shadow$share/{ConsumerGroupName}/iot-shadow-{GroupId}
Error$share/{ConsumerGroupName}/iot-error-{GroupId}
Telemetry$share/{ConsumerGroupName}/iot-telemetry-{GroupId}-{RuleName}