1. 程式人生 > >activemq 學習系列(六) activemq 集群

activemq 學習系列(六) activemq 集群

服務 .com active nec style failover ive 準備 mage

activemq 集群

activemq 是可以通過 networkConnectors 來實現集群的。

首頁準備多臺 activemq

技術分享圖片

1:端口號:8161,服務端口號:61616

2:端口號:8162,服務端口號:61617

3:端口號:8163,服務端口號:61618

然後在任意一臺的 /conf/activemq.xml 的 broker 節點中加入一個子節點

<networkConnectors>
    <networkConnector uri="static:(tcp://127.0.0.1:61617,tcp://127.0.0.1:61618)" duplex="true"/>
</networkConnectors>

分別啟動即可.

最後將連接改成

broker-url: failover:(tcp://localhost:61616,tcp://localhost:61617,tcp://localhost:61618)

activemq 學習系列(六) activemq 集群