mochi-mqtt / server

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

MQTT bridge #414

Closed analystcmyk closed 4 months ago

analystcmyk commented 5 months 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 4 months ago

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

dgduncan commented 4 months 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 4 months 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.