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.
       
       
  • 相关阅读:
    关系数据库&&NoSQL数据库
    NoSQL
    大数据时代的数据存储,非关系型数据库MongoDB
    判断是否为BST
    百度2017暑期实习生编程题
    memset()实现及细节
    在必须返回一个对象时,不要去尝试返回一个引用
    返回局部变量指针
    用引用返回值
    数组形参
  • 原文地址:https://www.cnblogs.com/empireghost/p/3941427.html
Copyright © 2011-2022 走看看