# Test MQTT Connection

### MQTT Client

Now user can use MQTT Client option to establish a MQTT connection and to perform pubsub operations. Go to **Experiment** section from left menu of dashboard and choose **MQTT Client**.&#x20;

Here user need to enter same **Client ID**, **Username** and **Password** used while adding a device.

{% hint style="info" %}
Username will be the Device Key starting with your account ID.The Client ID and Password will be the same you have entered during [**Add Device**](https://docs.thingsup.io/mqtt/add-mqtt-device) process.&#x20;
{% endhint %}

![MQTT Test Client](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FMqKXUO6qEZWGsKx1ztiN%2FmqttClientConnection_1.png?alt=media\&token=d3b445de-39a2-4387-8876-a3720e82b327)

#### Subscribe to topic

User can subscribe to a topic which he has mentioned while adding device to account.

{% hint style="info" %}
User has to make sure he has chosen *sub* or *pubsub* option to given topic.
{% endhint %}

![Subscribe to MQTT Topic](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FRjYAcFW3XnpmqAGzI2hL%2FmqttClientSubscribe_1.png?alt=media\&token=9623d362-28dc-4f79-a3fd-bbe48cf6ab4f)

#### Publish to topic

User can publish to a topic which he has mentioned while adding device to account.

{% hint style="info" %}
User has to make sure he has given *pub* or *pubsub* option to given topic.
{% endhint %}

![Publish to MQTT Topic](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FCmvMxllLJKZxCqfrpuI3%2FmqttClientPublish_1.png?alt=media\&token=a41cde15-4acb-4cbe-b536-ecd001ca4230)

User can see the list of *Message already sent* and *Messages Received* in side section.
