zoukankan      html  css  js  c++  java
  • 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.
       
       
  • 相关阅读:
    图文详解——将本地项目上传到码云(gitee)远程仓库
    mysql 查询正在执行的sql
    MySql 缓冲池(buffer pool) 和 写缓存(change buffer) 转
    SQLserver 查询某个表的字段及字段属性
    FastDFS 客户端(二)
    FastDFS 服务器(一)
    C# WPF 正常的项目突然提示 当前上下文中不存在名称“InitializeComponent”
    C# 程序自动重启的解决方法
    Array知识点总结(一)
    JavaScript中为false的情况归档
  • 原文地址:https://www.cnblogs.com/empireghost/p/3941427.html
Copyright © 2011-2022 走看看