English 中文(简体)
积极的MQ网络经纪人
原标题:ActiveMQ Network Brokers

I am trying to create an ActiveMQ Network which will be consisted of 2 Brokers. I have done then configuration as described in the related guide (http://activemq.apache.org/networks-of-brokers.html)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://activemq.org/config/1.0">

  <broker brokerName="receiver" persistent="false" useJmx="false">  
    <networkConnectors>
      <networkConnector uri="static:(tcp://host2:61616)"/>
    </networkConnectors>

    <persistenceAdapter>
      <memoryPersistenceAdapter/>
    </persistenceAdapter>

   <transportConnectors>
      <transportConnector uri="tcp://host1:61616"/>
    </transportConnectors>
  </broker>
</beans>

在上文的XML组合中,我假定网络的经纪人中有一人在主办方1,另一人在主办方2。 代理商2 具有相反的价值。 JMS没有开始,也没有在记录档案中产生任何例外,而唯一的信息是显示的。

INFO  | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@3df78040: startup date [Tue Nov 22 20:54:53 CET 2011]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main

是否有任何人设法建立了两个或两个以上活跃的MQ经纪人网络?

问题回答

如果您正在使用rel=“nofollow”的经纪人网络,你需要具体说明组成经纪人网络的经纪人的所有组成情况。

 <networkConnector name="HA Queue" uri="static:(tcp://host1:61616,tcp://host2:61616)"/>

此外,试图以这种方式具体指明运输连接器:

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" />
    </transportConnectors>

这与积极的薪酬制度非常常见。 你们可以找到一个样本组合,以把你的经纪人网络建立在以下单位之上:{ACTIVEMQ_HOME}/conf目录(活性mq-static-network-broker1.xml和活性q-static-network-broker2.xml)。

从我能看到你组合的名称空间来看,是错误的。 改为:

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:amq="http://activemq.apache.org/schema/core"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1">
    <!-- other stuff goes here -->
  </broker>

</beans>

了解的关键是,这是一种春天组合(http://www.mersframework.org/schema/beans),该组合有一个XBean config,界定了AMQ经纪人(http://activemq.apache.org/schema/core)。

我也赞同rod客所说的话,即使用0.0.0.0作为你的运输公司所在地国的国名。





相关问题
C# Networking API s [closed]

Lately I ve been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has ...

Listen to a port that is in use [duplicate]

Possible Duplicate: Get connecting IP from specified ports that using by other program. If a port is used by a program, is there any way I can listen that port and get the connected IP on that ...

Twisted Spread suitable for multiplayer racing sim?

Do you think that Twisted Spread may be suitable (in terms of performance) for a multiplayer racing simulator? The rest of the application is based on Python-Ogre. Can Perspective Broker run upon (...

Optimizing a LAN server for a game

I m the network programmer on a school game project. We want to have up to 16 players at once on a LAN. I am using the Server-Client model and am creating a new thread per client that joins. ...

multicast ip address - blocked in call to recvfrom

i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = ...

Java HTTPAUTH

我试图把桌面应用程序连接起来,我是同D.icio.us api @ Delicious Alan书写的,简单地向他们提供我的用户名和密码,并请他把书记上写给我......。

热门标签