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.
       
       
  • 相关阅读:
    c++ exports def文件
    对比WDCP面板与AMH面板的区别与选择
    阿里云服务器配置 SVN 服务器与生产站点同步
    linux-Centos7安装python3并与python2共存
    oracle数据库定时任务dbms_job的用法详解
    AnyRobot
    spring mvc activemq
    kafka 查看队列信息
    json多态序列化
    CentOS7.x使用overlay文件系统
  • 原文地址:https://www.cnblogs.com/empireghost/p/3941427.html
Copyright © 2011-2022 走看看