> For the complete documentation index, see [llms.txt](https://docs.buildings.ability.abb/collection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildings.ability.abb/collection/mandatory-base/platform-core/connect-hub/connectivity-as-a-service/connect-devices-via-mqtt/configure-a-subscription.md).

# Configure a Subscription

{% hint style="success" %}
**Prerequisite** You have created a new subscription as explained in [↗ Broker Details -> Create new subscription](/collection/mandatory-base/platform-core/connect-hub/connectivity-as-a-service/connect-devices-via-mqtt/configure-client.md#configure-broker).
{% endhint %}

## Overview

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2F7cGzcf4V2HliK8CkeRjK%2FGroup%20567.png?alt=media&amp;token=b81a80c8-7a9b-4ece-8112-eefe8cbc66db" alt=""><figcaption><p>Fig. 1 – Create a new subscription</p></figcaption></figure>

<table data-full-width="true"><thead><tr><th width="74.73332722981769">Symbol</th><th width="218">Description</th><th>Details</th></tr></thead><tbody><tr><td><strong>[A]</strong></td><td>Topic preview</td><td>In this section, you see a preview of the incoming data</td></tr><tr><td><strong>[A1]</strong></td><td>Input for the topic preview</td><td>Enter an MQTT topic here. Its data appears in the preview.<br><br>Important: In this field, you do <strong>NOT</strong> enter the topic to which you want to create a subscription – this is done in <strong>[C]</strong></td></tr><tr><td><strong>[B]</strong></td><td>Name</td><td>Give the subscription a name. The subscription is displayed in the subscription list (in the broker details) under this name</td></tr><tr><td><strong>[C]</strong></td><td>Topic</td><td>Enter the MQTT topic here to which you want to create a subscription.</td></tr><tr><td><strong>[D]</strong></td><td>QoS (Quality of Service)</td><td>Select a value. The QoS indicates the level of message delivery between the MQTT broker and the connected clients</td></tr><tr><td><strong>[E]</strong></td><td>One or more formats</td><td>Choose whether a single format or multiple formats should be applied to the incoming data. <a href="#one-or-more-formats">-> One or more formats</a></td></tr><tr><td><strong>[F]</strong></td><td>Create format</td><td>If you want to define a new format, click here. The window <a href="/collection/mandatory-base/platform-core/connect-hub/data-processing-function-formats/configure-a-format.md">↗ Configure Format</a> opens</td></tr><tr><td><strong>[G]</strong></td><td>Select existing format</td><td>Alternatively to <strong>[F]</strong>, you can also select an existing format</td></tr><tr><td><strong>[H]</strong></td><td>Save</td><td>Click to save the subscription</td></tr></tbody></table>

## One or more formats

<figure><img src="https://2013058394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOqGnkz52o2zVUsEGEZGk%2Fuploads%2F3Mtaa7af1ga0mwZz968x%2Fimage%2021.png?alt=media&amp;token=42692e96-c537-4714-80dc-eace1a92bdf8" alt=""><figcaption></figcaption></figure>

Choose whether a single format or multiple formats should be applied to the incoming data.

◈ If you select *Single*, the same format is used for all incoming data.

◈ If you select *Multiple*, you can differentiate the processing of the data – depending on the *topic*. This means: Within a subscription, different topics can be processed with different formats. For this, you use **patterns** to determine which data belongs to which format.

**Example:**

You subscribe to the topic `levels/+`. There are two actual topics:

* `levels/level1` → this data should be processed with **Decoder A**
* `levels/level2` → this data should be processed with **Decoder B**

Then in multiple mode, you enter two pairs:

| Pattern         | Format    |
| --------------- | --------- |
| `levels/level1` | Decoder A |
| `levels/level2` | Decoder B |

▷ This way, the data is automatically decoded with the correct format depending on the topic.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.buildings.ability.abb/collection/mandatory-base/platform-core/connect-hub/connectivity-as-a-service/connect-devices-via-mqtt/configure-a-subscription.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
