Open Message Queue 集群问题

 

nohup ./imqbrokerd -tty -name myBroker -port 7677 -javahome /opt/omae/jdk1.7.0_45 -cluster 192.168.27.160:7677,192.168.27.161:7677 -Dimq.cluster.masterbroker=192.168.27.160:7677 -Dimq.jms.max_threads=256 -license unl -vmargs "-Xms256m -Xmx512m -Xss256k" &

 

 

 ERROR [B3168]: Invalid broker address for this broker to run in cluster: Loopback IP address is not allowed in broker address mq://127.0.1.1:7677/?instName=myBroker&brokerSessionUID=9023604083637773312 for cluster

 

 

nohup ./imqbrokerd -tty -name myBroker -port 7677 -javahome /opt/omae/jdk1.7.0_45 -cluster "192.168.27.160:7677,192.168.27.161:7677" -Dimq.cluster.masterbroker=192.168.27.160:7677 -Dimq.jms.max_threads=256 -license unl -vmargs "-Xms256m -Xmx512m -Xss256k" -Dimq.hostname=192.168.27.161 &

 

 

com.sun.messaging.ConnectionFactory  myFactory = new com.sun.messaging.ConnectionFactory();       
//  Set the connection factory’s configuration properties.
myFactory.setProperty(ConnectionConfiguration.imqAddressList,"192.168.27.160:7677,192.168.27.161"); 

 

可以通过如下url查看 属性

https://mq.java.net/javadoc/4.5/javadoc/com/sun/messaging/ConnectionConfiguration.html 

 

imqAddressList
 
This property holds the address list that will be used to connect to the Sun MQ Message Service.
imqReconnectEnabled This property indicates whether the Sun MQ Client Application will attempt to reconnect to the Sun MQ Message Service upon losing its connection.
imqReconnectInterval
This property specifies the interval, in milliseconds, between successive reconnect attempts made by the MQ Client Application to the Sun MQ Message Service.
imqAddressListBehavior
This property determines how Sun MQ will select entries from the imqAddressList property to use when making a connection to the Sun MQ Message Service.   The acceptable values for this property are PRIORITY and RANDOM.
   
   

 

posted on 2014-08-28 14:31  empireghost  阅读(433)  评论(0编辑  收藏  举报

导航