APPLICATION
2024-04-30 415 View

MQTT Broker Connection

KIWIboards as MQTT Brokers


MQTT brokers are essential in the IoT architecture for several reasons. They efficiently route messages between devices, scale to handle numerous connections, ensure secure data transmission, integrate with diverse platforms, and manage client sessions for message continuity. Platforms like KIWIboards can also serve as MQTT brokers, expanding the available options for IoT communication infrastructures. Read our related post for a deeper understanding of how MQTT architecture works.

Types of MQTT Brokers


MQTT brokers come in various forms, each catering to different deployment scenarios and requirements. Here are some common types:

1. Local MQTT brokers

Such as Mosquitto and RabbitMQ, are deployed within a local network. They offer low-latency communication and are often used in home automation, industrial control systems, and small-scale IoT projects.

2. Cloud-based Brokers

Cloud-based MQTT brokers, like AWS IoT Core, Google Cloud IoT Core, and HiveMQ Cloud, provide scalable and managed MQTT broker services hosted on the cloud. They offer global reach, high availability, and automatic scaling, making them suitable for large-scale, geographically dispersed IoT deployments.

3. Edge Brokers

Edge brokers like Eclipse Kura and Eclipse Hono are deployed closer to IoT devices at the network's edge. They facilitate local message processing, filtering, and aggregation, reducing latency and bandwidth usage while enhancing privacy and security.

For a more detailed comparison of the available brokers in the market, refer to the table below.

Examples of MQTT Brokers' connections


In this MQTT architecture example, we have a simple IoT setup where a light is controlled by a push button, and the communication is facilitated through the MQTT protocol.

Here's how it works and the node's settings:

1. Broker (Mosquitto)

Mosquitto is configured as the MQTT broker in this architecture. It acts as an intermediary between the publisher (push button) and the subscriber (Node-RED application). When the push button publishes a message to the "KIWIboard/light_04" topic, Mosquitto receives the message and is responsible for routing it to the appropriate subscriber(s).

Since the Mosquitto broker runs locally, the server IP is at 127.0.0.1. Alternative brokers like hivemq can set the server as broker.hivemq.com 

 

2. Publisher (Push Button)

The push button serves as the publisher in this setup. When the button is pressed, it triggers an event, indicating a change in the state of the light. This event is then published as an MQTT message to a specific topic, in this case, "KIWIboard/light_04"

3. Subscriber (Alarm)

In the application, the MQTT subscriber is represented with an alarm that listens to messages published on the "KIWIboard/light_04" topic. Based on the content of the message (e.g., turning the light on or off), the alarm adjusts its state accordingly.

Why KIWIboard Solutions?


KIWIboards is the ideal choice for MQTT in IoT projects. It offers a seamless and user-friendly platform that simplifies the configuration, management, and visualization of MQTT data. With its intuitive interface and built-in support for popular MQTT brokers like Mosquitto, KIWIboards enables users to effortlessly harness the power of MQTT to create scalable, reliable, and responsive IoT applications.

About KIWIboard


KIWIboard is a complete solution provider, supporting all aspects of your project, from hardware to software to system integration, to keep your application running securely, reliably, and at peak performance. KIWIboard builds its products for high reliability, performance, security, scalability, and versatility. So, customers can expect a long lifespan, quickly adapt to evolving system requirements, and adopt future technologies as they emerge.

Next steps


Ready to talk about your projects with a KIWIboard expert? Contact us

Want to hear more from KIWIboard? For our newsletter, Sign up

Or request a quotation