How MQTT works
MQTT is a tiny publish/subscribe protocol for sensors and IoT devices: devices publish readings to topics on a broker, and anything subscribed to that topic gets them.
Layer: Application (OSI layer 7) · Port: 1883 / 8883 · Transport: TCP · Format: Small binary packets · Standard: OASIS MQTT 5.0
MQTT packet flow
- MQTT IP Camera → App Server: CONNECT client-id=sensor-7
- MQTT App Server → IP Camera: CONNACK
- MQTT IP Camera → App Server: PUBLISH office/temp 23.5
- MQTT App Server → IP Camera: PUBACK
Other protocols: HTTP · WebSocket · QUIC · SMTP · IMAP · POP3 · FTP · SMB · WebRTC · SIP · RTSP · RTMP · Modbus · PPPoE