Request (PUBLISH / CON) Ack (PUBACK / PUBREC / ACK…) Retransmit (duplicate) Dropped in transit
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

MQTT vs CoAP: IoT Protocol Reliability

This simulation demonstrates how Internet of Things (IoT) devices actually move data across an unreliable network using the two dominant lightweight protocols: MQTT and CoAP. A 3D scene renders a broker/server hub with publisher and subscriber devices; every message is animated hop by hop, so you can watch the exact handshake — PUBLISH/PUBACK for MQTT QoS 1, the four-step PUBLISH/PUBREC/PUBREL/PUBCOMP exchange for QoS 2, or CoAP's confirmable request with exponential-backoff retransmission — play out under a configurable packet-loss rate, with live counters for messages sent, delivered, retransmitted, and the resulting end-to-end reliability and latency.