> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eseye.com/smartconnect/at-command-reference/mqtt-at-commands/emqsubopen-create-a-subscribe-message-topic.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
