MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging "machine-to-machine" (M2M) or "Internet of Things" world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.
— Official description of MQTT from mqtt.org
This MQTT library implements the client side of the MQTT 3.1.1 protocol. This library is optimized for resource constrained embedded devices. Features of this library include:
Please see https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/mqtt for example code demonstrating integration with TLS.
Memory requirements of the MQTT library.
File | No Optimization (asserts enabled) | With -O1 Optimization (asserts disabled) | With -Os Optimization (asserts disabled) |
core_mqtt.c | 13.6K | 6.9K | 6.3K |
core_mqtt_state.c | 6.0K | 3.0K | 2.3K |
core_mqtt_serializer.c | 12.3K | 5.6K | 5.1K |
Total estimates | 31.9K | 15.5K | 13.7K |