Mosquitto

Use Case: Predictive maintainance ..

Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1.

Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers.

In this Lab we're going to PoC a Logistics scenario.

Predictive maintenance

Optimize delivery routes

• Each truck is fitted with a sensor which streams data in a Topic over GSM:

(Global System for Mobile Communication – using MQTT)

• End point is a MQTT Broker – Mosquitto.

• Pentaho Data Integration subscribes to that Topic

Deploys an insecure mosquitto container on localhost:1883

  1. Copy over the required files.

cd
mkdir -p ~/Streaming/Mosquitto && cd "$_"
cp -R ~/Workshop--Data-Integration/Labs/'Module 7 - Workflows'/'Streaming Data'/MQTT/* .
  1. To deploy the 'mosquitto' container.

cd
cd ~/Streaming/Mosquitto/scripts
docker compose up -d
  1. Check the container has been successfully deployed. Log into Portainer.

Username

admin

Password

Portainer123


MQTT Explorer

MQTT Explorer is a comprehensive MQTT client that provides a structured overview of your MQTT topics.

MQTT Explorer has already been installed and configured.

  1. Install MQTTExplorer.

cd
snap install mqtt-explorer
  1. Click on the MQTT Explorer button in the taskbar.

  2. Enter the following connection details:

Name

mosquitto

Protocol

mqtt://

Host

localhost

Port

1883

  1. Click save & Connect

  2. You can test publishing a message to the broker.

The message will appear at the bottom..

➡️ Next: MQTT Use Case using PDI

Last updated