Hornetq主從配置

  1. 進入集羣配置目錄 hornetq-2.4.0.Final/config/stand-alone/clustered
cd hornetq-2.4.0.Final/config/stand-alone/clustered
  1. 修改hornetq-configuration.xml 新增如下配置
<backup>${hornetq.backup:false}</backup>
   <shared-store>false</shared-store>
   <allow-failback>false</allow-failback>
   <failover-on-shutdown>false</failover-on-shutdown>
   <check-for-live-server>true</check-for-live-server>
  1. 啓動腳本修改hornetq-2.4.0.Final/bin/run.sh 修改配置文件目錄CONFIG_DIR=$HORNETQ_HOME/config/stand-alone/clustered
if [ a"$1" = a ]; then CONFIG_DIR=$HORNETQ_HOME/config/stand-alone/clustered; else CONFIG_DIR="$1"; fi

修改參數,備機-Dhornetq.backup=true.net

export CLUSTER_PROPS="-Dhornetq.backup=false -Djnp.port=1099 -Djnp.rmiPort=1098 -Djnp.host=192.168.1.1-Dhornetq.remoting.netty.host=192.168.1.1-Dhornetq.remoting.netty.port=5445"
  1. 啓動
     

nohup sh run.sh&netty

相關文章
相關標籤/搜索