mqtt mosquitto bridge horizontal scaling

Asked by Moses

mqtt mosquitto bridge horizontal scaling:

i have one load balancer i.e aws elb
all the pub/sub will be coming via that elb
two mosquitto broker A & mosquitto broker B under elb
one mosquitto broker to sync topic between this two brokers(mosquitto.broker.sync)

TRY ONE#########

this is how the configuration for mosquitto broker which sync topics between node A and B looks alike

connection mosquitto-bridge
try_private false
address mosquitto.broker.A:1883 mosquitto.broker.B:1883
start_type automatic
round_robin true
notifications true
topic # out 2

but this is not working it only connecting to mosquitto.broker.A and not connecting to mosquitto.broker.B

TRY TWO#########
undo all try one firstly

so i tried it other way round
removed all the bridge config from mosquitto.broker.sync (just to avoid loops)

and added this config onto nodes

## mosquitto.broker.A: ##

connection mosquitto-bridge
try_private false
address mosquitto.broker.sync:1883
start_type automatic
round_robin true
notifications true
topic # out 2

## mosquitto.broker.B: ##

connection mosquitto-bridge
try_private false
address mosquitto.broker.sync:1883
start_type automatic
round_robin true
notifications true
topic # out 2

but in this case the node on which i send the message is been duplicated over it

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Moses
Solved:
Last query:
Last reply:
Revision history for this message
Moses (moses-r) said :
#1

this worked , it was about adding a dummy topic to make work around for me

## mosquitto.broker.A: ##

connection mosquitto-bridge
try_private false
address mosquitto.broker.sync:1883
start_type automatic
round_robin true
notifications true
topic # both 2 "" A/

## mosquitto.broker.B: ##

connection mosquitto-bridge
try_private false
address mosquitto.broker.sync:1883
start_type automatic
round_robin true
notifications true
topic # both 2 "" B/

and nothing on sync server "mosquitto.broker.sync"