Skip to content

brianbirir/mosquitto-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mosquitto Broker via Docker

Deployment of Mosquitto broker via Docker. This repo contains the mosquitto config file that can be updated to configure the Docker running instance of Mosquitto.

Testing

Mosquitto comes with MQTT clients by default i.e. mosquitto_pub and mosquitto_sub clients. Ensure that the Docker instance of Mosquitto is running.

  • First run a subscriber client in one terminal:
sudo docker exec -it mqtt_broker mosquitto_sub -t building/#
  • Then publish a message using the mosquitto_pub client:
sudo docker exec -it mqtt_broker mosquitto_pub -m "37 degrees celsius" -t building/room/kitchen/temperature

You should see the message 37 degrees celsius in the terminal session that is running the subscriber client.

Releases

No releases published

Packages

No packages published