This project spawns a HiveMQ broker with MQTT Message Log extension in Docker.
- This script runs in bash.
- You will need to install:
- curl
- java OpenJDK 11
- docker
- unzip
- git https://github.com/git-guides/install-git
- MQTT CLI https://hivemq.github.io/mqtt-cli
- Clone this repo
git clone https://github.com/guinp1n/docker-hivemq-with-mqtt-log.git - Go to the repo directory
cd docker-hivemq-with-mqtt-log - Run
./build_and_run_docker.sh
-
Install MQTT CLI
https://hivemq.github.io/mqtt-cli -
Open a separate terminal window and subscribe
mqtt subscribe --topic # --debug --jsonOutput -
Open a separate terminal window and publish
mqtt publish --topic 'Test' --message 'Hello' --debug
Attach to the docker container. Monitor the hivemq.log
docker exec 'hivemq' tail -f /opt/hivemq/log/hivemq.log