Uma versão simples de um Broker MQTT
841
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.
Pull the Docker image:
docker pull infozap/simple-mqtt-broker
start your container:
docker run -d -p 1883:1883 infozap/simple-mqtt-broker
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:
mosquitto_pub -h localhost -p 1883 -t "test/topic" -m "Hello, MQTT!"
Subscribe to a topic:
mosquitto_sub -h localhost -p 1883 -t "test/topic"
Content type
Image
Digest
sha256:2a6615cf5…
Size
54.8 MB
Last updated
about 2 years ago
docker pull infozap/simple-mqtt_broker