I have several remote devices that need to be bridges with the main system. The documentation text suggest either round robbin or multiple connections are possible. I always end up round robbin and need multiple concurrent connections. I can’t find an example of the latter only a mention in text. What am I missing.
#Connection Ship
connection ship
addresses 192.168.1.5:1883 192.168.1.3:1883 #topic # out 0
topic # in 0
***or
#Connection Rocket
connection rocket
addresses 192.168.1.5:1883 #topic # out 0
topic # in 0 #Connection Sky
connection sky
address 192.168.1.3:1883 #topic # out 0
topic # in 0
MQTT brdiging currently only allows for round robin [true/false].
There are no other options. From the docs:
round_robin [ true | false ] If the bridge has more than one address given in the address/addresses configuration, the round_robin option defines the behaviour of the bridge on a failure of the bridge connection. If round_robin is false, the default value, then the first address is treated as the main bridge connection. If the connection fails, the other secondary addresses will be attempted in turn. Whilst connected to a secondary bridge, the bridge will periodically attempt to reconnect to the main bridge until successful. If round_robin is true, then all addresses are treated as equals. If a connection fails, the next address will be tried and if successful will remain connected until it fails.
Could you please link, where you found information on possible other behavior?
What option were you exactly looking for?
If I understand you correctly, then you have 3 brokers and want two of those bridging their messages to one main broker.
TBH, your second config looks fine to me:
#Connection Rocket
connection rocket
addresses 192.168.1.5:1883 #topic # out 0
topic # in 0 #Connection Sky
connection sky
address 192.168.1.3:1883 #topic # out 0
topic # in 0
Here you should get both broker message streams. I don´t see how round robin can apply in that case. It should only be an option for multiple connections behind the “addresses” parameter.
As the docs say: Either round robin applies or it is a failover cases.
Another approach would be to create bridges on the other broker.
In this case, I would configure the bridges in the two remote mosquittos to publish to your main broker.