Bridging for Redundency

Hello, I am new to MQTT.

I am trying to bridge several brokers together, such that if one of them goes down, theother clients can still receive broadcast messages from clients connected to brokers that are alive.

I am able to bridge broker2 to broker1, but for broker3, what can I do? I have tried putting bridging to broker2 and broker1 but it resulted in publishing of messages in a infinite loop, when all 3 are up.
And if I were to just put a bridge to broker2 only, it works fine, all clients are able to recieve the broadcast messages, however if i were to turn off broker2, clients connected to broker1 are not able to receive messages.

Furthermore, I am expecting more brokers and clients to come in in the future, any tips/pointers from expects greatly appreciated! TIA

Hi Zsefv,

When I understand you correctly, you basically want to create a High high-availability cluster.
This means that if one broker goes down, another will take over for him. This is something we offer as a solution for our Mosquitto Pro broker.

I do not think there is a good way of creating this with only briding. Especially not if you are looking into keeping persistent sessions up, QOS1/2 settings, Queues etc.
Depending on the use case either only a HA cluster or a HA cluster with bridges connecting to that cluster will be the solution for you. If you bridge all brokers to the cluster and connect subscribing clients only to the cluster level, these will always get the information from all connected bridges. So if one fails, all others still work.

Have a look here for our cluster: https://cedalo.com/mqtt-broker-pro-mosquitto/high-availability/
You can also contact us for more information if that would help you: Contact us | Cedalo