Mqtt Mirror Save

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

Project README

mqtt-mirror

docker docker version license

mqtt-mirror diagram

mqtt-mirror

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


Mqtt-mirror subscribes to the source broker and publishes replicated messages to the target broker.
Replicated messages preserve the original QoS and Retain 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 at spotsie.io ! :sparkles:

1.0 (GA) roadmap

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

Get started

Mqtt-mirror is available as a standalone binary, docker image and helm chart.

Install

Docker :whale:

docker run antegulin/mqtt-mirror ./mqtt-mirror \
tcp://username:[email protected]:1883 \
tcp://target.xyz:1883 \
--topic_filter=events,sensors/+/temperature/+,logs# \
--verbose

Helm chart :package:

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 :beer:

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

Shell script :clipboard:

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

Compile from source :hammer:

# Clone it outside GO path
git clone https://github.com/4nte/mqtt-mirror
cd mqtt-mirror

# Get dependencies
go 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.

Open Source Agenda is not affiliated with "Mqtt Mirror" Project. README Source: 4nte/mqtt-mirror
Stars
36
Open Issues
1
Last Commit
6 months ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating