MQTT and HTTP protocols
ClearBlade IoT Core supports device MQTT and HTTP connection and communication protocols. Devices communicate with ClearBlade IoT Core across the MQTT or HTTP bridge. The MQTT/HTTP bridge is a central ClearBlade IoT Core component.
When you create a device registry, you select protocols to enable MQTT, HTTP, or both.
MQTT is a standard publish/subscribe protocol frequently used and supported by embedded devices and is also common in machine-to-machine interactions.
HTTP is a connectionless protocol: devices do not maintain a connection to ClearBlade IoT Core with the HTTP bridge. Instead, they send requests and receive responses. ClearBlade IoT Core supports HTTP 1.1 only.
How the protocols work in ClearBlade IoT Core:
MQTT bridge | HTTP bridge |
---|---|
Device connection is maintained | Connectionless (request/response) |
Full-duplex TCP connection | Half-duplex TCP connection |
JWT is sent in the | JWT is sent in the HTTP request’s |
Telemetry events are pushed to Cloud Pub/Sub | Telemetry events are pushed to Cloud Pub/Sub |
Device connection status is reported | No device connection status reported |
Device configurations are propagated via subscriptions | Device configurations must be explicitly requested (via polling) |
Devices always receive the most recent configuration (whether newer or not) on subscription | Devices can specify that only newer configurations should be received |
Device configurations are acknowledged (ACKed) when using QoS 1 | No explicit |
Last device heartbeat time is retained | No device heartbeat data |
Protocol features:
MQTT | HTTP |
---|---|
|
|
Both bridges use public key (asymmetric) device authentication and JSON Web Tokens (JWTs). For details, see the device security section.
If you need help determining which protocol is best for your use cases, start with HTTP to familiarize yourself with ClearBlade IoT Core. Then switch to MQTT if required.