The high availability of Message Queuing is achieved through clustering.
Message Queuing stores important information such as orders, mail notifications, and data distribution in the project, so there is a high demand for stable availability of Message Queuing.
It is now possible to ensure the availability of a ACTIVEMQ node by zookeeper choosing the form of ACTIVEMQ leader.
Zookeeper as the service picker to select Activemq as Master.
The development environment will zoopkeeper ZOO_SAMPLE.CFG copy and modify the file name as Zoo.cfg.
ACTIVEMQ configuration Disable kahadb enable LEVELDB where zkaddress= "127.0.0.1:2181" is configured on top Zoopkeeper
<!--do not use the Kahadb method
<persistenceAdapter>
<KAHADB directory= "${activemq.data}/kahadb"/>
</persistenceAdapter>
-
<persistenceAdapter>
<replicatedleveldb
directory= "${activemq.data}/leveldb"
Replicas= "3"
Bind= "tcp://0.0.0.0:0"
Zkaddress= "127.0.0.1:2181"
Hostname= "127.0.0.1"
Sync= "Local_disk"
Zkpath= "/activemq/leveldb-stores"
/>
</persistenceAdapter>
If the development machine is in the same machine can modify the following port to implement multiple ACTIVEMQ on the same computer to start
<transportConnectors>
<!--DOS protection, limit concurrent connections to $ and frame size to 100MB--
<transportconnector name= "Openwire" uri= "tcp://0.0.0.0:61617?maximumconnections=1000& wireformat.maxframesize=104857600 "/>
<transportconnector name= "AMQP" uri= "amqp://0.0.0.0:5673?maximumconnections=1000& wireformat.maxframesize=104857600 "/>
<transportconnector name= "Stomp" uri= "stomp://0.0.0.0:61614?maximumconnections=1000& wireformat.maxframesize=104857600 "/>
<transportconnector name= "Mqtt" uri= "mqtt://0.0.0.0:1884?maximumconnections=1000& wireformat.maxframesize=104857600 "/>
<transportconnector name= "ws" Uri= "Ws://0.0.0.0:61615?maximumconnections=1000&wireformat.maxframesize =104857600 "/>
</transportConnectors>
Zookeeper + LevelDB + activemq for high availability of Message Queuing