MQTT FAQ: Client Choice, Connections and Subscriptions
This page collects the questions that come up most often when choosing a client, connecting, and subscribing or publishing, with a short answer and a pointer to the page that covers it in depth. Step-by-step instructions live on the topic pages; this page does not repeat long tutorials.
Choosing a client
What is an MQTT client?
An MQTT client is a tool that connects to a broker, subscribes to topics, publishes messages and shows the traffic. Use it to verify device reporting and platform commands during device integration, or to reproduce an issue during platform development.
Which MQTT client is best?
| Requirement | Recommendation |
|---|---|
| WebSocket, scripting, full 5.0 | MQTTX |
| Topic tree browsing, retained cleanup, numeric charts | MQTT Explorer |
| A commercial license already purchased, full 5.0 toolchain | MQTT.fx |
| Free and open source, lightweight, TCP/UDP and MQTT in one app | NetAssistant |
No single tool covers every scenario. For everyday publish and subscribe, a lightweight client saves resources; when you need to browse the whole broker structure, a topic tree is more direct.
Is NetAssistant free?
Yes, free and open source under Apache-2.0, with no trial period and no license management.
Which platforms are supported?
Windows 10/11, Ubuntu 22.04 and later, and macOS 10.15 and later, covering both x64 and ARM64.
Connection questions
What is the MQTT default port?
Plain MQTT uses 1883, TLS uses 8883 and WebSocket commonly uses 8083/8084. NetAssistant only supports direct TCP connections, so ws:// and wss:// addresses cannot connect.
Can a client ID be reused?
No: a client ID must be unique on the same broker. When it is reused, the newer connection kicks the previous client offline; duplicating a connection generates a new ID automatically.
MQTT 3.1.1 or 5.0?
Use 3.1.1 for older devices, older brokers or basic publish and subscribe; use 5.0 when you need session expiry, receive maximum and more specific reason codes. NetAssistant defaults to 5.0.
How do I configure TLS for MQTT?
Set the port to 8883 and enable TLS, then choose system roots, a custom CA or skipped verification depending on where the certificate comes from; add a client certificate and private key when mutual TLS is required. See MQTT TLS configuration.
What if the connection is refused?
First confirm the port is reachable, the address and TLS switch match, the client ID is unique and the account has permission, then use the CONNACK return code or the 5.0 reason code to pinpoint the cause. See MQTT troubleshooting.
Subscribing and publishing
Why do I get no messages after subscribing?
An MQTT subscribe can succeed and still deliver nothing. Check in order: the subscription switch, whether the publish topic matches the filter, retain, QoS, the publish-side ACL and session settings, then cross-check with mosquitto_sub or another client.
How do I clear a retained message?
Publish an empty payload to the same topic with retain enabled; the broker then deletes the retained message.
Why are QoS 1 messages duplicated?
QoS 1 is at-least-once, so retransmission or reconnects can deliver duplicates and the application has to deduplicate; only QoS 2 guarantees exactly once.
When is the last-will message sent?
Only on an abnormal disconnect, for example a network drop, a killed process or a keep-alive timeout; an intentional disconnect does not trigger it.
How do I receive offline messages?
Use a fixed client ID and keep a persistent session: turn Clean Session off for 3.1.1, or turn Clean Start off with a session expiry greater than 0 for 5.0, and the broker keeps the offline messages.
Does NetAssistant support MQTT stress testing?
Not yet. NetAssistant's stress-testing engine only covers TCP/UDP; use MQTTX Bench or emqtt_bench for MQTT load tests.
Next steps
- Connect to a broker from scratch: MQTT tutorial
- Full capabilities and settings: MQTT client
- TLS and mutual authentication: MQTT TLS
- 5.0 sessions and reason codes: MQTT 5.0
- Test scenarios: QoS, retain and last-will checks
- Platform installs: Windows, macOS, Linux
- Differences from MQTT.fx: MQTT.fx comparison
- All choices: MQTT client comparison overview
- Download NetAssistant
