// mqtt
MQTT
Connect to an MQTT broker over a persistent backend connection, subscribe to topics, and publish messages — all from a request tab, with a live transcript of the traffic.
What It Does
- Connects to plaintext (
mqtt://, default port 1883), TLS (mqtts://, default port 8883), or barehost:portbrokers - Subscribes to a topic, including wildcards like
sensors/# - Publishes messages to a topic
- Supports QoS 0, 1, and 2 for the subscription and published messages
- Optional client ID (auto-generated when blank), username, and password
- Resolves
{{variables}}in topics, client ID, credentials, and payload - Keeps the password in the OS keychain — it is not written to the collection files or the saved tab state
- Live status indicator with a received-message count and an incoming-message flash
- Transcript of published and received messages with topics and timestamps
Connecting
- Enter the broker URL —
mqtt://broker.example.com,mqtts://…for TLS, orhost:port - Optionally set a client ID, username, and password
- Click Send — the status indicator goes live once connected. Sending again with the same settings reuses the open connection
- Use the Disconnect button in the MQTT panel to close the connection
Subscribing
- Enter a topic filter, e.g.
sensors/temperatureorsensors/#for a wildcard - Choose the QoS level
- Click Send — matching messages stream into the transcript as they arrive
Publishing
- Enter the target topic
- Enter the payload in the body editor
- Click Send — the message is published on the open connection
Troubleshooting
Cannot connect
- Check the scheme and port — 1883 for
mqtt://, 8883 formqtts:// - Verify credentials, and that the broker accepts your client ID
No messages received
- Confirm the topic filter actually matches the published topics
- Check that the subscription QoS is acceptable to the broker
Next Steps
- WebSocket — bidirectional messaging over a single connection
- Server-Sent Events — server-push streaming over HTTP