Hi Jian
I've pulled the clustered mosquitto branch code, compiled with those flags and got it running now with 2 instances - did a quick test connecting to one broker on node1 and then another client connect to node2 and sub on both client to topic "#" - when I pub a test msg on client1, client2 recv it, so the cluster is working - the 2 brokers also ack that they see each other - fairly easy to set this up :)
I am using one server with diff ports to run this cluster ...node1 is
127.0.0.1:8000 and node2 is
127.0.0.1:9000 ...seem 2 be working just fine on same server with different ports ^_^.
Question
Will it even make sense to try this - get server with 16 CPU's and run 8 brokers on single box....? Normal Mosquitto is only using a single CPU at time - with this option you can already use one server with more CPU's to handle the traffic/load ....<or> is the idea to use small 2 cpu servers in clustered network mode behind LB like nginx or aws ELB?
But in short - got it running and can assist in some testing scenarios - exiting times 2 be honest, - if this really works under load, means we can scale the awesome mosquitto broker to bigger loads ^_^ - "big up for C & mosquitto i say" ^_^