Overview of mqtt_client
masterThe mqtt_client package is a Dart implementation of the MQTT v3 (3.1 and 3.1.1) protocol designed for server and browser environments. It automates complex MQTT protocol tasks such as connection handshakes, keep-alive mechanisms, and message exchanges required for different Quality of Service (QoS) levels, allowing developers to focus on publishing and subscribing.
Key Features:
- Protocol Support: MQTT v3 (3.1 and 3.1.1). For MQTT v5, use
mqtt5_clientinstead. - Connection Types:
- Server Client: Supports normal/secure TCP and secure (wss)/non-secure (ws) WebSockets.
- Browser Client: Supports only secure (wss) and non-secure (ws) WebSockets.
- Capabilities: Supports subscription/publishing at all QoS levels, keep-alive, and synchronous connections.
- Compatibility: Successfully used with Google IoT Core, Amazon AWS, Microsoft Azure, IBM, Mosquitto, and others.