8 Real-World MQTT Use Cases
Charles Mahler /
Product, Use Cases
Sep 21, 2022
MQTT is becoming the standard protocol for applications that operate in environments where network connectivity is intermittent or unreliable, reducing bandwidth usage is a priority, or where hardware resources are limited.
MQTT use cases
MQTT was originally designed by IBM for use by oil and gas companies who needed to be able to send and receive data from sensors located on pipelines in remote locations.
Eventually IBM released a specification for MQTT and other businesses saw the value of MQTT for many of their own IoT workloads beyond the oil and gas industry it was initially designed for and created their own MQTT implementations. Let’s take a look at a handful of industries that are using MQTT.
Smart homes and wearable devices
MQTT is used for communication between many consumer IoT devices. This could include everything from smart home devices like thermostats, appliances, or security systems as well as wearable devices like smart watches, fitness trackers, health monitoring tools, or your smartphone. MQTT is used because it’s a widely adopted standard and provides the performance benefits mentioned above that are ideal for consumer IoT applications where maximizing battery life and minimizing bandwidth consumption are important for user experience.
As a result an ecosystem of IoT frameworks like Node-Red and Home Assistant have been created that have integrations for MQTT to make connecting different devices together easy and allow users to create automations and alerts based on their use case.
Modern manufacturing is increasingly relying on data to become more cost effective and responsive to market demands. MQTT plays a big role in this by making it much easier to move data from the factory floor into the cloud. In the past manufacturing companies had many data silos and issues with different machines all communicating in proprietary vendor-specific protocols. The move towards MQTT solves both of these problems.
Common use cases in manufacturing for this kind of telemetry data is to make products more reliable (by doing automated testing during the assembly process) and increasing uptime of assembly lines (by enabling predictive maintenance of hardware before it fails).
Automobile manufacturers are using MQTT to give their customers a better product and also open up new revenue streams for themselves. BMW, for example, built their car-sharing service that manages a fleet of over 14,000 vehicles across 18 cities on top of MQTT. Other common use cases include predictive maintenance to extend the life of vehicles by collecting and transmitting data over MQTT, and using MQTT for communication related to driver assistance features and autonomous driving.
At a government level the US National Highway Traffic Safety Administration estimates that adopting technologies like MQTT to enable more vehicle-to-vehicle (V2V) and vehicle-to-everything (V2X) communication could result in 439,000 fewer traffic accidents per year, a 13% annual reduction.
Retail businesses are using IoT sensors in stores to collect telemetry data for things like customer traffic, product inventory, theft prevention, and sales tracking. This data can be used at the store level to take action at the microscale for things like daily operations, and then transmitted to the cloud to allow business analysts to make forecasts and projections at a company level by using the aggregated data collected across all stores.
MQTT is ideal for real-time monitoring of assets as they move all around the world. Even if internet connectivity is lost during transit, MQTT is designed to ensure delivery of data once it is regained. In a world with increasingly complex supply chains, MQTT is becoming even more important for gaining visibility into supply chains to mitigate and respond to issues as quickly as possible.
Cities are adopting more IoT technology to become more efficient and sustainable. By 2025 the IoT market size for smart cities is projected to reach around $260 billion as cities continue rolling out more hardware. This includes sensors, cameras, and other devices to perform tasks like tracking traffic flow, energy usage, water management, and much more. MQTT acts as the common communication protocol that these devices, which are made by many different vendors, will use to transport data and communicate with each other.
Agriculture businesses are adopting IoT solutions for managing both crop farming and livestock. For crops, sensors can be used to collect data related to soil pH, temperature, moisture, and many other relevant metrics used to forecast yields.
Similar data can also be collected for livestock to make sure animals are healthy. In some cases farmers are using this data to detect livestock with fevers or other signs of illness and are able to separate them from the herd before other animals get sick. Another use case for ranchers is to put tracking tags on livestock so they can be tracked as they move through pastures and fields. Many of these solutions use MQTT to move data from sensors in the field to the cloud.
Mobile application development
Two apps that use MQTT that you might be familiar with are Facebook Messenger and Instagram. The Facebook Messenger team chose MQTT over HTTP because mobile applications are fairly similar to IoT workloads in regards to network connectivity and the necessity to reduce battery usage. For group chats in Facebook Messenger, MQTT’s pub/sub architecture was a natural fit with each group chat being its own topic that users could subscribe to for publishing and receiving messages. Instagram also uses MQTT for delivering push notifications and other features where using MQTT makes sense.
For mobile apps in general, MQTT is ideal because it allows for persistent connections to be created that allow devices to receive new messages without consuming large amounts of bandwidth or burning through the phone’s battery. If you are building any mobile app that will require network communication frequently, MQTT is worth considering.
MQTT as the bridge between Edge and Cloud
MQTT is obviously great for communication between devices on the edge due to its pub/sub architecture, but an increasingly common use case for MQTT is as a gateway to the cloud to expose edge data to other services within the enterprise that might be interested in that edge data.
Kafka and Kubernetes are commonly used technologies in the data center that are starting to be used at the edge as well. Many vendors are seeing the value of MQTT and building direct integrations to make it easy to move data back and forth between Kafka or Kubernetes based applications using MQTT. Kubernetes can also be used for managing MQTT brokers at the edge or in the cloud in a scalable fashion.
The key takeaway here is that MQTT gives developers a ton of flexibility depending on their use case. In some situations more analysis and computation might need to be done at the edge in real-time; in others, MQTT is just used for moving data to the cloud where the data is then stored and analyzed.
IoT is making an impact across a number of industries, and MQTT is becoming the glue that ties it all together due to the number of advantages it provides to developers. If you want to learn more about MQTT, check out some of these resources: