Vsmqtt is a simple MQTT client integrated in vscode.
- Create and use multiple mqtt profiles
- Connect to broker
- Support for secure connection
- Publish messages to mqtt brokers
- Subscribe to topics
- Browse details of received messages
- Connect to multiple brokers simultaneously
- Colors to differentiate messages by topics
- Pin topics (pinned topics are saved to settings and are used to subscribe to automatically upon connection)
- Export to csv
- Support for websocket connection
- Clear retained messages
- Right click on message to open in text edior
- Save/load default topic, payload, qos and retain values for publish section on UI
This extension stores mqtt broker profiles in workspace settings.json under: "vsmqtt.brokerProfiles".
| name | type | description | required |
|---|---|---|---|
| name | string | Profile name | - |
| host | string | Broker host | - |
| port | number | Broker port | - |
| path | string | Broker path | - |
| username | string | Client username | |
| password | string | Client pasword | |
| promptCredentials | boolean | Ask for username and password before connecting to the broker | |
| protocol | string | "mqtt", "mqtts", "tcp", "tls", "ws", "wss" | |
| ca | string | Absolute path for cert file or cert string in PEM format | |
| key | string | Absolute path for client cert file or cert string in PEM format | |
| cert | string | Absolute path for client key file or cert string in PEM format | |
| clientId | string | Client ID | |
| keepalive | number | Keepalive interval in seconds. | |
| insecure | boolean | Disable verification of the server hostname in the server certificate. This option makes it possible for a malicious third party to impersonate your server through DNS spoofing. Use it in testing environment only. | |
| rejectUnauthorized | boolean | Skip server certificate validation | |
| unixSocket | boolean | Connect to unix socket | |
| savedSubscriptions | array | Array of saved subscriptions, each object with topic (string) and qos (number: 0, 1, or 2) | |
| defaultsForPublish | object | Defaults for publish: topic (string), payload (string), qos (number: 0, 1, or 2, default 0), retain (boolean, default false). This is used for populating publish part on UI |
Password protected connection:
{
"name": "client with password",
"host": "localhost",
"port": 1884,
"username": "user01",
"password": "securepassword"
}Connecting to TLS protected broker:
{
"name": "client with tls",
"host": "broker.emqx.io",
"port": 8883,
"protocol": "mqtts",
"ca": "/path_to_crt"
}Connecting to broker using websocket:
{
"name": "broker.emqx.io",
"host": "ws://broker.emqx.io",
"port": 8083,
"clientId": "vsmqtt_client_test",
"protocol":"ws",
"path": "/mqtt"
}Connecting to unix socket
{
"name": "unix connection",
"protocol": "mqtt",
"path": "/var/run/mosquitto/mosquitto.sock",
"unixSocket": true
}| Name | Description |
|---|---|
| addProfile | Create new mqtt broker profile |
| editProfile | Edit existing mqtt broker profile |
| deleteProfile | Delete mqtt broker profile |
| connectToBroker | Connect to broker |
| refreshProfileList | Refresh sidebar view |
All commands can be invoked also from the ui.
