ann
冰是没有未来的,因为它的永恒
posts - 107,comments - 34,trackbacks - 0
使用代理群集(注意队列同步时候的 用户名和密码要一致 )
     Message Queue Enterprise Edition 支持使用代理群集。代理群集是一组协同工作为客户端提供消息传送服务的代理。通过使用群集,消息服务器可以将客户端连接分布在多个代理上,从而根据消息流量相应地调整自己的操作。有关群集及其工作原理的概述,请      参见 Message Queue 技术概述。
     可通过为群集中的每个成员代理指定群集配置属性来定义群集。可以为群集中的每个代理单独设置这些属性,但是,通常较为方便的一种做法是将这些属性收集到所有代理均引用的一个中心群集配置文件中。这样可防止设置出现不一致的情况,并确保群集中的          所有代理都共享相同、一致的配置信息。
        详细介绍了群集配置属性。其中包括以下内容:

          imq.cluster.brokerlist 给出了属于群集的所有代理的主机名和端口号。
          imq.cluster.masterbroker 指定跟踪状态变化的主代理(如果有)。
          imq.cluster.url 指定群集配置文件(如果有)的位置。
          imq.cluster.hostname 给出 cluster 连接服务(用于群集中代理之间的内部通信)的主机名或 IP 地址。如果有多个主机可用,该设置会很有用:例如,如果一台计算机中安装了多个网络接口卡。
          imq.cluster.port 给出 cluster 连接服务的端口号。
          imq.cluster.transport 指定 cluster 连接服务所使用的传输协议,如 tcp 或 ssl。
       可以为每个代理单独设置 hostname 和 port 属性,但群集中所有代理的 brokerlist、masterbroker、url 和 transport 值必须相同。

       以下部分介绍了如何设置代理的群集配置属性。可以对群集中的每个代理单独进行设置,也可以使用群集配置文件来集中进行设置。

       分别为各个代理设置群集属性

        可以在代理的实例配置文件(或在启动代理时的命令行)中设置代理的群集配置属性。例如,要创建由 host1 端口 9876 上的代理、host2 端口 5000 上的代理以及 ctrlhost 默认端口 (7676) 上的代理组成的群集,应在这三个代理的实例配置文件中包含以下       属性:

      imq.cluster.brokerlist=host1:9876,host2:5000,ctrlhost

      请注意,如果采用此方法,则当群集配置需要更改时,您必须更新群集中每个代理的实例配置文件。

      使用群集配置文件

      为保持一致性和易维护性,建议将所有共享群集配置属性收集到一个群集配置文件中,而不是分别为每个代理设置这些属性。采用此方法时,每个代理的实例配置文件必须将 imq.cluster.url 属性设置为指向该群集配置文件的位置:例如,

      imq.cluster.url=file:/home/cluster.properties

      然后群集配置文件定义群集中所有代理的共享配置属性,例如要连接的代理的列表 (imq.cluster.brokerlist)、用于 cluster 连接服务的传输协议 (imq.cluster.transport) 以及(可选)主代理的地址 (imq.cluster.masterbroker)。下面的代码定义了与前面      的示例相同的群集,其中在 ctrlhost 上运行的代理充当主代理:

      imq.cluster.brokerlist=host1:9876,host2:5000,ctrlhost
      imq.cluster.masterbroker=ctrlhost


一 . Adding Brokers to a Conventional Cluster

  1. To Add a New Broker to a Conventional Cluster Using a Cluster Configuration File
     1).Add the new broker to the imq.cluster.brokerlist property in the cluster configuration file.
     2).Issue the following command to any broker in the cluster: imqcmd reload cls
     3).(Optional) Set the value of the imq.cluster.url property in the new broker’s instance configuration file            (config.properties) to point to the cluster configuration file.
     4).Start the new broker.
     注意 :If you did not perform step 3, use the -D option on the imqbrokerd command line to set the value of imq.cluster.url to the location of the cluster configuration file.

 
  2. To Add a New Broker to a Conventional Cluster Using a Cluster Configuration File
     1).(Optional) Set the values of the following properties in the new broker’s instance configuration file (config.properties)               :
              imq.cluster.brokerlist
              imq.cluster.masterbroker (if necessary)
              imq.cluster.transport (if you are using a secure cluster connection service)
     2).Modify the imq.cluster.brokerlist property of other brokers in the cluster to include the new broker.
          This step is not strictly necessary to add a broker to a functioning cluster. However, should any broker need to be                 restarted, its imq.cluster.brokerlist value must include all other brokers in the cluster, including the newly added           broker.
     3).Start the new broker.
        If you did not perform step 1, use the -D option on the imqbrokerd command line to set the property values listed there.


posted on 2009-12-22 09:32 冰是没有未来的,因为它的永恒 阅读(534) 评论(0)  编辑  收藏 所属分类: openMQ (imq)

当下,把心放下 放下如果是可能的,那一定是在当下,
不在过去,也不在未来。
当下放下。唯有活在当下,你的问题才能放下。