Skip to content

IoT on the Edge with HiveMQ

by Mary Brickenstein-Hofschen
13 min read

The trend is clear: as the number of devices connected to the Internet grows, action in IoT is heating up on the edge. This ‘edge’ is the intersection between the devices that generate and receive data and the cloud that stores and processes the data. At the edge of IoT, the devices or ‘things’ of IoT (for example, sensors, actuators, vehicles, or other system end-point devices) exchange data in near real-time with edge devices. These edge devices (or systems of edge devices) serve as entry points to primary enterprise systems that are installed on-premise or in the cloud. Edge devices connect to different networks and infrastructures in a secure fashion, process data on the edge, and forward data to the enterprise systems for further analysis.

Location, location, location

Closer geographical proximity to the source of the data, autonomy from the cloud, and low-latency processing capabilities are important characteristics of edge devices. Previously, IoT applications primarily focused on getting information from ‘things’ and sending that data somewhere else for analysis. Today, modern IoT use cases frequently demand a roundtrip processing time of 10 ms or less. In such cases, the ability to process device data autonomously from the connected cloud systems is vital. Edge computing provides the necessary division of labor. Some work takes place at the edge of the network where IoT meets the physical world. The edge device can be managed over the cloud but lives close to the data source. For IoT solutions, this existence on the edge offers some very attractive benefits:

  • Ability to operate edge devices in offline mode for on-site completion of complex computation and pre-processing.

  • Lower costs due to selective communication of data to the cloud (reduced traffic and cloud storage).

  • Faster, more reliable response times, unencumbered by network latency.

  • Efficient cloud-based orchestration for deployment, configuration, and updates.

  • Reduced need for manual operation or human intervention.

The right blend

MS Azure IoT Edge is a fully-managed service that allows developers to deploy cloud workloads to IoT edge devices. One such workload is running the HiveMQ MQTT broker on Azure IoT Edge. The combination of HiveMQ and Azure IoT Edge is an excellent fit for scenarios where devices/machines need to exchange data over an MQTT broker and you want to leverage the power and flexibility of the Cloud to support decisions and actions on and about the physical world. What you achieve is an efficient and highly cost-effective way to compute and communicate on the Edge. Here’s a closer look at what each one brings to the mix:

Azure IoT Edge

  • Cross-operability between the cloud and the Edge

  • Easy deployment, maintenance, and configuration of remote devices

  • Ability to test in the cloud before deploying all the way to the device

  • Possibility to deploy insights to edge devices from learning models in the cloud utilizing Azure AI technologies

  • Containerized cross-platform environment that can run on Windows and Linux

  • Bi-directional communication and a device management SDK from cloud gateway

  • Cloud-managed deployment of HiveMQ broker for M2M communication


  • Reliable intra-edge communication, without dependency on internet connectivity

  • Vendor neutrality with complete support of all versions and features of the open MQTT standard

  • Control over which part of the IoT data is sent to the cloud or analyzed on the Edge

  • Reduced bandwidth and costs

  • Enterprise and open source versions with an impressive extension system

  • Very high throughput MQTT option that can be implemented right at the Edge

  • Decoupling of the sender and receiver of data

Case in point

Let’s visualize how HiveMQ and Azure IoT Edge work together in some real-world scenarios:

Intra-machine communication with HiveMQ and Azure IoT Edge

Azure IoT Hub Connected Car

In this use case, we’ve chosen a connected car as the machine. You can think of this familiar machine as one big Azure IoT Edge device. Within the device/car, there are lots of components. For example, an engine control unit, sensors on brakes, and so on.

Our goal is to enable the different components within the car to talk with each other. Additionally, we want to analyze the data sets that the components provide and be able to push some of that data to the cloud.

The combination of HiveMQ and IoT Edge gives us everything we need. IoT Edge ensures that our IoT devices can be easily provisioned and managed in the cloud. While HiveMQ guarantees fast and efficient bi-directional communication between all the components in our car.

The low overhead and very low latencies of MQTT work well with the sensors and control networks of our machine. Since mobile machines such as our connected car need to push all the data through mobile networks, the lower bandwidth yields noticeable cost savings.

Implementation of early data analysis combined with machine learning and AI helps keep expenses in line. Only selected and pre-analyzed data is streamed to the cloud.

Inter-machine communication with HiveMQ and Azure IoT Edge

Azure IoT Hub and HiveMQ communication

For this use case, we need an entire factory. Our factory is filled with many different machines. You can think of the factory floor - with all its machines - as one individual Azure IoT Edge device.

Our goal in the factory is similar to the previous use case (only on a grander scale). We want each of the machines to be able to talk with each other and we want to selectively push information to and from the cloud.

Once again, although the focus in our factory is slightly different, the combination of HiveMQ and Azure IoT Edge delivers on all our concerns:

Machine operation and machine-to-machine communication that is completely independent of the Internet. Even without an Internet connection, machines can still talk to each other and they can still do it with an open standard protocol.

Lightning-fast response times and the lowest possible latencies on the local network to help protect resources, maximize efficiency, and minimize cost. The ability to react on time or facilitate communication from one machine to another machine without the cloud.

Full support of the open MQTT protocol to prevent vendor lock-in and ensure that your machines can take advantage of all MQTT features.

Customized security that provides the option of different layers of security on premiss and cloud. Set your own security rules for the machines on the factory floor and for the data that is going to the cloud or being processed by Azure IoT.

Compute and analyze directly on the Edge. You can do your machine learning right on the Edge and use the MQTT data and pass the results of your data analysis back into the MQTT stream. Push workloads down to the factory because the faster you can have results or analysis from your data on the factory floor, the better. Do most or all of the work right on the edge and only push interesting results back to the cloud or to other machines.

Getting the edge

The robust and seamless integration between IoT and Cloud that edge architecture presents has obvious potential for extending the Internet of Things. Shifting some or all IoT processing to the edge is certainly an interesting option for any use-case that requires low-latency communication. This is a move towards interactive applications that do more than simply collect data and send it to cloud systems for centralized processing and storage. Customers can benefit from the flexible edge solution that HiveMQ and Azure IoT Edge provides in many innovative and diverse IoT applications .

Further resources

Webinar: Machine to Machine Communication with IoT Edge and HiveMQ
Tutorial: Machine to Machine Communication with IoT Edge and HiveMQ

Mary Brickenstein-Hofschen

Mary is a technical writer at HiveMQ. She enjoys providing precise information that helps HiveMQ users get things done.

  • Contact Mary Brickenstein-Hofschen via e-mail

Related content:

HiveMQ logo
Review HiveMQ on G2