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

相关文章
相关标签/搜索