{"id":13582079,"url":"https://github.com/4nte/mqtt-mirror","last_synced_at":"2025-08-26T14:07:30.296Z","repository":{"id":62205106,"uuid":"234756808","full_name":"4nte/mqtt-mirror","owner":"4nte","description":"Fork MQTT traffic from broker A to B like it's potatoes 🥔.","archived":false,"fork":false,"pushed_at":"2023-10-18T09:45:02.000Z","size":18839,"stargazers_count":40,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-05T21:45:45.805Z","etag":null,"topics":["docker","kubernetes","mqtt","mqtt-mirror","mqtt-service","traffic-control"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4nte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-01-18T15:41:41.000Z","updated_at":"2024-10-17T07:06:34.000Z","dependencies_parsed_at":"2023-01-20T19:49:30.390Z","dependency_job_id":"0a3345bf-c935-49e4-96ae-5c188c39c0e3","html_url":"https://github.com/4nte/mqtt-mirror","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nte%2Fmqtt-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nte%2Fmqtt-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nte%2Fmqtt-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4nte%2Fmqtt-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4nte","download_url":"https://codeload.github.com/4nte/mqtt-mirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231737331,"owners_count":18418997,"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":["docker","kubernetes","mqtt","mqtt-mirror","mqtt-service","traffic-control"],"created_at":"2024-08-01T15:02:25.104Z","updated_at":"2024-12-29T13:00:32.891Z","avatar_url":"https://github.com/4nte.png","language":"Go","funding_links":[],"categories":["Tools","Go"],"sub_categories":["Talks"],"readme":"# mqtt-mirror\n\n![docker](https://img.shields.io/github/go-mod/go-version/4nte/mqtt-mirror)\n![docker](https://img.shields.io/docker/pulls/antegulin/mqtt-mirror)\n![version](https://img.shields.io/github/v/release/4nte/mqtt-mirror?sort=semver)\n![license](https://img.shields.io/github/license/4nte/mqtt-mirror)\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"mqtt-mirror diagram\" src=\"https://i.imgur.com/EOGwXRf.png\" height=\"150\" /\u003e\n  \u003ch3 align=\"center\"\u003emqtt-mirror\u003c/h3\u003e\n\u003cp align=\"center\"\u003eFork MQTT traffic with no fuss, deploy in seconds. Kubernetes ready.\u003c/p\u003e\n\n\n---\n\nMqtt-mirror subscribes to the _source broker_ and publishes replicated messages to the _target broker_.  \nReplicated messages preserve the original _QoS_ and _Retain_ message options.  \n\n\nAll topics are mirrored by default, you can cherry pick topics to be mirrored by specifying topic filters. Standard MQTT wildcards `+` and `#` are available, [see wildcard spec](https://mosquitto.org/man/mqtt-7.html).\n\n![Example usage](./img/demo.svg)\n\n#### Should I use this in production?  \nmqtt-mirror is not tested well enough to be relied upon for critical purposes. Until a stable 1.0 release, use with caution.\n\nTake in consideration that outbound traffic will increase by the amount of inbound traffic.  \nUse topic filters to prevent mirroring of unecessary messages.\n\nmqtt-mirror is used in production at [spotsie.io](https://spotsie.io) ! :sparkles:\n\n### 1.0 (GA) roadmap \n- [ ] Helm chart liveness probe\n- [x] Integration test\n- [ ] Stress test\n- [ ] Expose Prometheus metrics\n\n## Get started\n\nMqtt-mirror is available as a **standalone binary**, **docker image** and **helm chart**.\n\n### Install\n\n**Docker** :whale:\n```\ndocker run antegulin/mqtt-mirror ./mqtt-mirror \\\ntcp://username:pass@source.xyz:1883 \\\ntcp://target.xyz:1883 \\\n--topic_filter=events,sensors/+/temperature/+,logs# \\\n--verbose\n```\n\n**Helm chart** :package:\n```\nhelm repo add 4nte https://4nte.github.io/helm-charts/\nhelm install mqtt-mirror 4nte/mqtt-mirror \\\n--set mqtt.source=$SOURCE_BROKER \\\n--set mqtt.target=$TARGET_BROKER \\\n--set mqtt.topic_filter=foo,bar,device/+/ping \\\n```\n\n**Homebrew** :beer:\n```\nbrew tap 4nte/homebrew-tap\nbrew install mqtt-mirror\n```\n\n**Shell script** :clipboard:\n```\ncurl -sfL https://raw.githubusercontent.com/4nte/mqtt-mirror/master/install.sh | sh\n```\n\n\n**Compile from source** :hammer:\n```\n# Clone it outside GO path\ngit clone https://github.com/4nte/mqtt-mirror\ncd mqtt-mirror\n\n# Get dependencies\ngo get ./..\n\n\n# Build, duh.\ngo build -o mqtt-mirror\n\n# Use it like there's no tomorrow\n./mqtt-mirror --version\n```\n\n## Sponsors\n![spotsie](https://spotsie.io/images/spotsie.svg)\n\n## Development\nIf you like this project, please consider helping out. All contributions are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4nte%2Fmqtt-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4nte%2Fmqtt-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4nte%2Fmqtt-mirror/lists"}