Sign inSign up

infozap/simple-mqtt_broker

By infozap

•Updated about 2 years ago

Uma versão simples de um Broker MQTT

Image
Networking
API management
Developer tools
1

841

infozap/simple-mqtt_broker repository overview

⁠Simple MQTT Broker

Simple MQTT Broker is a lightweight, easy-to-use MQTT broker built using pure Python. This Docker image provides a simple way to set up and run an MQTT broker for your IoT applications.

⁠Features

  • Pure Python implementation of the MQTT protocol
  • Lightweight and easy to deploy
  • Suitable for small to medium-scale IoT projects

⁠Getting Started

⁠Prerequisites
  • Docker installed on your machine
⁠Installation
  1. Pull the Docker image:

    docker pull infozap/simple-mqtt-broker
    
    
    
  2. start your container:

    docker run -d -p 1883:1883 infozap/simple-mqtt-broker
    
    
  3. docker compose:

    version: '3'
    services:
      mqtt-broker:
        image: infozap/simple-mqtt_broker
        container_name: my-broker
        ports:
          - "1884:1883"
          - "5500:5500"
    

Configuration The broker runs with default settings. To customize the broker, you can use environment variables or modify the source code as needed.

Environment Variables BROKER_PORT: The port on which the broker listens for connections (default: 1883)

Usage Once the broker is running, you can connect your MQTT clients to it using the broker's IP address and port 1883.

Example using mosquitto_pub and mosquitto_sub:

Publish a message:

  1. publish a message in using mosquitto:
    mosquitto_pub -h localhost -p 1883 -t "test/topic" -m "Hello, MQTT!"
    
    

Subscribe to a topic:

  1. subscribe a topic in using mosquitto:
    mosquitto_sub -h localhost -p 1883 -t "test/topic"
    
    

Tag summary

Content type

Image

Digest

sha256:2a6615cf5…

Size

54.8 MB

Last updated

about 2 years ago

docker pull infozap/simple-mqtt_broker