mochi-mqtt / server

The fully compliant, embeddable high-performance Go MQTT v5 server for IoT, smarthome, and pubsub
MIT License
1.11k stars 198 forks source link

MQTT bridge #414

Closed analystcmyk closed 1 week ago

analystcmyk commented 3 weeks ago

I am looking to do the following using a single binary with only CLI params,

Broker1 : publishes to /a/b/c I want to subscribe to this topic, and republish to Broker2, using the CLI , to topic /x/y/z

What would be the best way to use mochi for this?

eg mqtt --republish --in broker1:1883/a/b/c --out Broker2:1883/x/y/z

Thank you

perbu commented 2 weeks ago

Isn't this exactly what Benthos (Redpanda connect) was made to solve?

dgduncan commented 2 weeks ago

@analystcmyk If you want you can use the internal client and subscribe to the # topic to get a copy of every single message if that works for you.

analystcmyk commented 1 week ago

Broker bridging in my case is on the edge, so i decided to use an esp32 using PubSubClient.h and subscribe/publish on that device. Thank you for thinking along about bridging.