Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Fork MQTT traffic from broker A to B like it's potatoes 🥔.

License

NotificationsYou must be signed in to change notification settings

4nte/mqtt-mirror

Repository files navigation

dockerdockerversionlicense

mqtt-mirror diagram

mqtt-mirror

Fork MQTT traffic with no fuss, deploy in seconds. Kubernetes ready.


Mqtt-mirror subscribes to thesource broker and publishes replicated messages to thetarget broker.
Replicated messages preserve the originalQoS andRetain message options.

All 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.

Example usage

Should I use this in production?

mqtt-mirror is not tested well enough to be relied upon for critical purposes. Until a stable 1.0 release, use with caution.

Take in consideration that outbound traffic will increase by the amount of inbound traffic.
Use topic filters to prevent mirroring of unecessary messages.

mqtt-mirror is used in production atspotsie.io ! ✨

1.0 (GA) roadmap

  • Helm chart liveness probe
  • Integration test
  • Stress test
  • Expose Prometheus metrics

Get started

Mqtt-mirror is available as astandalone binary,docker image andhelm chart.

Install

Docker 🐳

docker run antegulin/mqtt-mirror ./mqtt-mirror \tcp://username:pass@source.xyz:1883 \tcp://target.xyz:1883 \--topic_filter=events,sensors/+/temperature/+,logs# \--verbose

Helm chart 📦

helm repo add 4nte https://4nte.github.io/helm-charts/helm install mqtt-mirror 4nte/mqtt-mirror \--set mqtt.source=$SOURCE_BROKER \--set mqtt.target=$TARGET_BROKER \--set mqtt.topic_filter=foo,bar,device/+/ping \

Homebrew 🍺

brew tap 4nte/homebrew-tapbrew install mqtt-mirror

Shell script 📋

curl -sfL https://raw.githubusercontent.com/4nte/mqtt-mirror/master/install.sh | sh

Compile from source 🔨

# Clone it outside GO pathgit clone https://github.com/4nte/mqtt-mirrorcd mqtt-mirror# Get dependenciesgo get ./..# Build, duh.go build -o mqtt-mirror# Use it like there's no tomorrow./mqtt-mirror --version

Sponsors

spotsie

Development

If you like this project, please consider helping out. All contributions are welcome.


[8]ページ先頭

©2009-2025 Movatter.jp