MQTT over UDP is a lightweight, low-latency messaging protocol delivering MQTT-style publish/subscribe communication over UDP instead of TCP. It combines MQTT semantics (topics, payloads) with UDP speed (low overhead) and a custom application-level reliability layer — purpose-built for IoT telemetry, edge systems, industrial automation, and constrained devices.
Removes TCP connection overhead — ultra-fast delivery for time-critical IoT telemetry and industrial automation where every millisecond counts.
Application-level ACK, retry, and fragmentation/reassembly ensure delivery guarantees without TCP's heavy connection state overhead.
Compact binary packets with minimal memory and CPU footprint — ideal for embedded MCUs, low-power sensor nodes, and edge gateways.
Clients construct MQTT-style payloads, fragment them into UDP segments, and transmit with an application-level reliability layer. The broker validates, buffers, and reassembles before dispatching to subscribers.
Each UDP packet consists of a fixed 30-byte binary header followed by variable-length RawData carrying the MQTT topic and payload. Minimum packet size is 32 bytes (header only); MTU target is 1472 bytes for standard Ethernet.
| Code | Type | Direction |
|---|---|---|
| 0x0001 | MSG_PUBLISH | Client → Server |
| 0x0002 | MSG_SUBSCRIBE | Client → Server |
| 0x0003 | MSG_UNSUBSCRIBE | Client → Server |
| 0x0004 | MSG_PINGREQ | Client → Server |
| 0x0005 | MSG_CONNECT | Client → Server |
| 0x0006 | MSG_DISCONNECT | Client → Server |
| Code | Type | Meaning |
|---|---|---|
| 0x1001 | ACK_SUCCESS | Segment acknowledged |
| 0x1002 | ACK_COMPLETE | Full message received |
| 0x2001 | NAK_AUTH_FAIL | Auth failure |
| 0x2002 | NAK_INVALID_SEG | Bad segment number |
| 0x2003 | NAK_CHECKSUM | CRC mismatch |
| 0x2004/5 | NAK_MALFORMED/SIG | Invalid packet |
XEUPD (eXtended Enhanced UDP Protocol) is Kayil Systems' production-hardened implementation — bridging the gap between UDP speed and enterprise-grade reliability. It addresses every UDP limitation while maintaining the speed advantage over TCP-based MQTT.
| Feature | MQTT / TCP | MQTT / UDP | XEUPD (Our Protocol) |
|---|---|---|---|
| Transport | TCP | UDP | UDP + Reliability Layer |
| Connection | Stateful (3-way HS) | Connectionless | Session-aware over UDP |
| Reliability | Built-in | None | Custom ACK + Retry |
| Latency | Moderate | Very Low | Ultra-Low |
| Protocol Overhead | High | Minimal | Low — optimised |
| Fragmentation | TCP/IP Stack | App responsibility | Intelligent engine |
| Packet Loss | Auto retransmit | Dropped silently | Selective retransmission |
| Scalability | Medium | Very High | Extremely High |
| Broadcast/Multicast | Limited | Supported | Native optimised |
| IoT Suitability | Good | Very Good | Excellent |
| Security | TLS | DTLS / Custom | XEUPD Secure Layer |
| Best Use Cases | Standard Messaging | Gaming, VoIP | IoT, Medical, Telemetry |