{"id":16131816,"url":"https://github.com/bcopy/activemq-mqtt-example","last_synced_at":"2025-04-06T14:41:03.629Z","repository":{"id":73468537,"uuid":"128523711","full_name":"bcopy/activemq-mqtt-example","owner":"bcopy","description":"Yet another ActiveMQ / MQTT example, using the Webcenter docker image","archived":false,"fork":false,"pushed_at":"2018-04-09T07:25:46.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T20:43:25.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcopy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-07T11:52:00.000Z","updated_at":"2024-02-14T23:46:03.000Z","dependencies_parsed_at":"2023-04-18T07:31:54.957Z","dependency_job_id":null,"html_url":"https://github.com/bcopy/activemq-mqtt-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcopy%2Factivemq-mqtt-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcopy%2Factivemq-mqtt-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcopy%2Factivemq-mqtt-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcopy%2Factivemq-mqtt-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcopy","download_url":"https://codeload.github.com/bcopy/activemq-mqtt-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500220,"owners_count":20948874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T22:27:21.753Z","updated_at":"2025-04-06T14:41:03.595Z","avatar_url":"https://github.com/bcopy.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# activemq-mqtt-example\nYet another ActiveMQ / MQTT example, combining with InfluxDB / Telegraf and Grafana for visualization and alerting.\n\n## Configuring ActiveMQ\nThe `modules/broker/src/main/docker/conf` folder contains useful configuration files.\nThe `modules/broker/src/main/docker/conf/activemq.xml` contains activation for the MQTT connector and some startup topics and queues.\n\n## Starting up ActiveMQ\nRun\n```\ncd modules/broker\n./start.sh\n```\nActiveMQ should start up and dump its activity to the standard output. You can kill it with Ctrl+C.\n\n## Subscribing to ActiveMQ via MQTT\nYou can use a debug MQTT client like so :\n```\ndocker run -it --rm --net=host efrecon/mqtt-client sub -h localhost -t \"boxe/#\" -v\n```\n\n## Publishing to ActiveMQ via MQTT\nYou can use a debug MQTT client to publish data like so :\n```\ndocker run -it --rm --net=host efrecon/mqtt-client pub -h localhost -t \"boxe/sensor1/values\" -d\n```\n\n## Inspecting ActiveMQ activity\nStartup the hawt.io console and via your web browser, connect to :\n* scheme : http\n* host : localhost\n* port : 8161\n* path : /api/jolokia\n\n\n## Setting up the Raspberry Pi\n\n* Install docker Community edition : https://docs.docker.com/install/linux/docker-ce/debian/#install-docker-compose-for-raspbian\n* Install git : `sudo apt install -y git`\n* Pull a few images :\n  * docker pull woahbase/alpine-activemq:armhf\n  * docker pull woahbase/alpine-grafana:armhf\n  * docker pull woahbase/alpine-influxdb:armhf\n\n* Startup ActiveMQ (with MQTT enabled on port 1883)\n\n* Startup InfluxDB to collect data\n```\ndocker run -d --name=influxdb --restart=always \\\n   --hostname medtech-boxe-pi \\\n  -e PGID=1000 -e PUID=1000 \\\n  -p 8086:8086 -p 8088:8088 -p 4242:4242 \\\n  -v data:/var/lib/influxdb \\\n  -v /etc/hosts:/etc/hosts:ro \\\n  -v /etc/localtime:/etc/localtime:ro \\\n  woahbase/alpine-influxdb:armhf\n```\n* Startup Telegraf to collect data\n```\ndocker run -d --name=telegraf --restart=always --hostname medtech-boxe-pi -v $PWD/modules/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro telegraf\n```\n\n* Startup Grafana to inspect the data\n```\ndocker run -d --restart=always \\\n  --name grafana --hostname medtech-boxe-pi \\\n  -e PGID=1000 -e PUID=1000 \\\n  -p 3000:3000 \\\n  -v data:/var/lib/grafana/data \\\n  -v conf:/var/lib/grafana/conf \\\n  -v /etc/hosts:/etc/hosts:ro \\\n  -v /etc/localtime:/etc/localtime:ro \\\n  woahbase/alpine-grafana:armhf\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcopy%2Factivemq-mqtt-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcopy%2Factivemq-mqtt-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcopy%2Factivemq-mqtt-example/lists"}