Skip to content
Stand with Ukraine flag

Application shared subscriptions

The Application Shared Subscription entity enables the Shared Subscriptions feature for APPLICATION clients, allowing multiple clients to subscribe and receive messages from a shared subscription.

  • Create an Application Shared Subscription entity when you plan to use shared subscriptions with APPLICATION clients.
  • After creation, the Topic filter and Partitions fields cannot be changed.
  • Shared subscriptions work with MQTT 5 and earlier versions.

Administrators can manage shared subscriptions via the Web UI or REST API.

  1. Open the Shared Subscriptions page and click the plus icon.
  2. Fill in the following fields:
    • Name — any display name, e.g., “Application Shared Subscription”.
    • Topic filter — the actual MQTT topic filter (wildcards # and + are supported). If your full shared subscription topic filter is $share/group1/city/+/home/#, set this field to city/+/home/#. Cannot be changed after creation and must be unique.
    • Partitions — set to equal or a multiple of the expected number of subscriber clients for even load distribution. For example, if 5 clients will subscribe, use 5, 10, or 15. Cannot be changed after creation.
  3. Click Add.

After creation, a dedicated Kafka topic is created using the following naming convention:

MQTT topic filterKafka topic
test/topictbmq.msg.app.shared.test.topic
test/#tbmq.msg.app.shared.test.mlw
test/+tbmq.msg.app.shared.test.slw

Where /., #mlw (multi-level wildcard), +slw (single-level wildcard).

If the topic filter contains special characters beyond alphanumerics, a hash is used instead:

tbmq.msg.app.shared.$TOPIC_FILTER_HASH

This behavior is controlled by TB_APP_PERSISTED_MSG_SHARED_TOPIC_VALIDATION (enabled by default). When disabled, Kafka topics are not created for topic filters with special characters.

Only the Name field can be edited after creation.

  1. Click on the shared subscription row.
  2. Click the Toggle edit mode button (pencil icon).
  3. Modify the name and click Apply changes.
  1. Delete single — click the Delete icon in the corresponding row, or open the entity and click the Delete button.
  2. Delete multiple — select multiple items using checkboxes, then click the Delete icon in the top right corner.