> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/smartconnect/at-command-reference/mqtt-at-commands/emqsubopen-create-a-subscribe-message-topic.md).

# EMQSUBOPEN – create a subscribe message topic

Create and view subscribe message topics. Use these topics to send data from the MQTT broker to your thing.

The topic name depends on the MQTT parameter unless you use a token. See [Using the AnyNet SMARTconnect™ configuration file](/smartconnect/getting-started/using-the-anynet-smartconnect-tm-configuration-file.md).

You can use the following tokens to construct the topic name:

* `$t` — Returns the cloud `thingName`.
* `$i` — Returns the device International Mobile Equipment Identity (IMEI).

For example, `status/$i` publishes as `status/`.

You can only include one token in a topic.

| Type  | Syntax                                    | Returned result                         |
| ----- | ----------------------------------------- | --------------------------------------- |
| Test  | `AT+EMQSUBOPEN=?`                         | Available indexes, QoS values, and `OK` |
| Read  | `AT+EMQSUBOPEN?`                          | A list of subscribe topics and `OK`     |
| Write | `AT+EMQSUBOPEN=(0-7),"/[$t \| $i]"[,qos]` | Creates or updates a subscribe topic    |

The Read command returns the index, unique topic name, and appended `topicsuffix` path. `topicsuffix` can include `$i` for the IMEI or `$t` for the cloud `thingName`. The complete topic must not exceed `256` characters. The Quectel module does not return empty topics.

For the Write command:

* Set the subscribe index from `0` through `7`.
* Set a topic title up to `256` characters, including `/cloudThingName` or `/IMEI`.
* Do not use special characters in a topic title.
* Use `topiclist` to request the current topic list.
* Optionally set QoS to `0` for at-most-once delivery or `1` for at-least-once delivery.

#### Example

```
AT+EMQSUBOPEN=0,"SubscribeFromCloud0/$i,1"
OK
+EMQSUBOPEN: 0,0
```

```
AT+EMQSUBOPEN=1,"SubscribeFromCloud1"
OK
+EMQSUBOPEN: 1,0
```

```
AT+EMQSUBOPEN?
+EMQSUBOPEN:
0: SubscribeFromCloud0/862061040777777
1: SubscribeFromCloud1/cloudThingName
OK
```


---

# 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.eseye.com/smartconnect/at-command-reference/mqtt-at-commands/emqsubopen-create-a-subscribe-message-topic.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.
