activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 付天时 <>
Subject uses Apache ZooKeeper to pick a master
Date Mon, 14 Dec 2015 06:59:03 GMT
Hi   we use the master-slave cluster,using Apache ZooKeeper to pick a master, we have three
replications(,99,116),we have one master ,two slaves,and three zookeepers(192.168.103,104,105)
,one of the configurations of replications is as follows:
                    bind="tcp://"    <!-- the other two are
and -->
                        hostname=""  <!-- the other two are -->

we do not need persistence,we only use the topic ,so our message is not stored,as we running
the master-slave cluster,it often elects automatically  ,the pressure of master replication
and the three zookeepers is not big,we check the logfile $activemqdir/data/activemq.log ,we
don't find any error or exceptions,it tells us as follows:

2015-12-14 08:13:27,929 | INFO  | Slave stopped | org.apache.activemq.leveldb.replicated.MasterElector
| ActiveMQ BrokerService[replicating-broker] Task-2
2015-12-14 08:13:27,930 | INFO  | Not enough cluster members have reported their update positions
yet. | org.apache.activemq.leveldb.replicated.MasterElector | ActiveMQ BrokerService[replicating-broker]
2015-12-14 08:13:27,958 | INFO  | Promoted to master | org.apache.activemq.leveldb.replicated.MasterElector
| main-EventThread
2015-12-14 08:13:27,965 | INFO  | Using the pure java LevelDB implementation. | org.apache.activemq.leveldb.LevelDBClient
| ActiveMQ BrokerService[replicating-broker] Task-2
2015-12-14 08:14:46,837 | INFO  | Master started: tcp:// | org.apache.activemq.leveldb.replicated.MasterElector
| ActiveMQ BrokerS

we can see that,it elected costs the time from 08:13:27,958 to 08:14:46,837,as time goes on,the
time elected will cost longer ,we must delete the  dir $activemqdir/data/ of all nodes after
we can stop it,so it can elected quickly after we start all the nodes,what's the matter with
it ? why the cluster often elected ,how it can elected quickly ? 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message