# On MQTT Topic

## Overview

![The On MQTT Topic Node.](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-1c3d67f8ec15203a30dae039529e26f21758ba10%2Fonmqtttopicupdatedimage.png?alt=media)

**On MQTT Topic** is an **Event Listener Node** that executes when an **MQTT** *Message* (only for the specificed `Topics`) is received. `Topics` are *strings* that act as filters for *Messages* and are hierarchical, meaning there are different levels. Remember, they are case sensitive.

In order to use this **Node**, the user must have already subscribed to the specified `Topics` with the [**MQTT Subscribe Node**](https://docs.incari.com/incari-studio/2022.2/toolbox/communication/mqtt/mqttsubscribe).

[**Scope**](https://github.com/cgi-studio-gmbh/incari-doc/blob/2022.2/toolbox/communication/overview.md#scopes): **Project**, **Scene**.

## Attributes

![The On MQTT Topic Node Attributes.](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-3ee0d8af91e422bb857a36bfa809314eee72900e%2Fonmqtttopicattributes.png?alt=media)

| Attribute       | Type           | Description                                        |
| --------------- | -------------- | -------------------------------------------------- |
| `Configuration` | **Drop-down**  | The connection, or signal name, that will be used. |
| `Topic`         | **User Input** | The key in the **MQTT** key/value pair.            |

## Example

![On MQTT Topic Example.](https://4267723012-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOEts3pBau6LMamSYhGZp%2Fuploads%2Fgit-blob-16e6ca7a1c4482ec1a0713b6ed15d1ef6a19f9a6%2Fonmqtttopicexample.png?alt=media)

The above image shows what happens when an **MQTT** connection has been made in the **Project Settings**. The connection's name will appear under `Configuration`. One or more `Topic Names` can be added, which appear as **Output Pulses** on the **Node**. It is possible to specify if they are binary or not. Each of these `Topics` have a corresponding `Body` **String**, which is the value in the **MQTT** key/value pair.

## See Also

* [**On MQTT Start**](https://docs.incari.com/incari-studio/2022.2/toolbox/communication/mqtt/events/onmqttstart)
* [**On MQTT Stop**](https://docs.incari.com/incari-studio/2022.2/toolbox/communication/mqtt/events/onmqttstop)

## External Links

* [*An in-depth explanation of Topics*](http://www.steves-internet-guide.com/understanding-mqtt-topics/)
