MQTT Broker

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.

Run Mosquitto:

cd mqtt-broker
docker compose up -d
cd ..

After a few seconds:

mqtt-cli test -h mosquitto

Docker Compose

services:
  mosquitto:
    image: eclipse-mosquitto:2
    ports:
      - "1883:1883"
    restart: on-failure
    volumes:
      - ./mosquitto.conf:/mosquitto/config/mosquitto.conf
      - mosquitto_data:/mosquitto/data

volumes:
  mosquitto_data:

networks:
  default:
    external: true
    name: kafka-sandbox_network