# MQTT, CoAP and HTTP

Once a device is on a network, it needs a way to send its data. MQTT, CoAP and HTTP each suit different kinds of device.

Page: https://dharanova.com/learn/iot-protocols · Track: Talk · Level: Core · Facts last checked 6 October 2026

Diagram: Two rows. MQTT: a device publishes a message to a named topic on a broker, which forwards it to two subscribers; it runs over TCP on port 1883, or 8883 with TLS, and offers QoS 0 (at most once), QoS 1 (at least once) and QoS 2 (exactly once). MQTT 5.0 and 3.1.1 are OASIS standards and 3.1.1 is also ISO/IEC 20922. CoAP (RFC 7252): a REST-style request goes from client to server and a response comes back, over UDP on port 5683, or 5684 with DTLS.

## Key points

1. MQTT is a publish/subscribe protocol: devices publish messages to named topics on a broker, which forwards them to subscribers. MQTT 5.0 and 3.1.1 are OASIS standards; 3.1.1 is also ISO/IEC 20922. [1][2]
2. MQTT offers three delivery levels: QoS 0 (at most once), QoS 1 (at least once) and QoS 2 (exactly once). [1]
3. The registered TCP ports are 1883 for MQTT and 8883 for MQTT over TLS. [3][1]
4. CoAP (RFC 7252) is a REST-style request/response protocol for constrained devices that runs over UDP, on port 5683, or 5684 when secured with DTLS. [4][3]

## Where to go next

- [Device-to-app sync for VAHA: architecture, and the integrity and security of the current build](https://dharanova.com/whitepapers/vaha-device-to-app-sync-integrity-security.md): a whitepaper from our lab
- [Matter, Thread and Zigbee](https://dharanova.com/learn/smart-home-standards.md): How smart-home devices from different brands are meant to work together, and which part of the job each standard covers.

## Sources

1. [MQTT Version 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html), OASIS
2. [ISO/IEC 20922:2016 Message Queuing Telemetry Transport (MQTT) v3.1.1](https://www.iso.org/standard/69466.html), ISO
3. [Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml), IANA
4. [RFC 7252: The Constrained Application Protocol (CoAP)](https://www.rfc-editor.org/rfc/rfc7252.html), IETF
