代理的ActiveMQ网络增加了延迟

代理的ActiveMQ网络增加了延迟,activemq,cluster-computing,capacity,Activemq,Cluster Computing,Capacity,我已经配置了一个ActiveMQ代理网络,从功能上看,它似乎工作得很好。 然而,从连接到代理a的生产者到连接到代理b的消费者的消息传输能力大约是连接到同一代理的生产者/消费者的三倍。 这对我来说似乎很奇怪,因为我的印象是,一旦代理a将消息传递给代理b,它就是从代理a POV传递的消息,所以容量应该不会减少 以下是我的activemq.xml配置: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq

我已经配置了一个ActiveMQ代理网络,从功能上看,它似乎工作得很好。 然而,从连接到代理a的生产者到连接到代理b的消费者的消息传输能力大约是连接到同一代理的生产者/消费者的三倍。 这对我来说似乎很奇怪,因为我的印象是,一旦代理a将消息传递给代理b,它就是从代理a POV传递的消息,所以容量应该不会减少

以下是我的activemq.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="localhost" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" persistent="false">

    <destinationPolicy>
        <policyMap>
          <policyEntries>
            <policyEntry topic=">" producerFlowControl="true" memoryLimit="5mb">
              <pendingSubscriberPolicy>
                <vmCursor />
              </pendingSubscriberPolicy>
            </policyEntry>
            <policyEntry queue=">" producerFlowControl="true" memoryLimit="50mb">

              <!-- Use VM cursor for better latency
                   For more information, see:

                   http://activemq.apache.org/message-cursors.html

              <pendingQueuePolicy>
                <vmQueueCursor/>
              </pendingQueuePolicy>
              -->
            </policyEntry>
          </policyEntries>
        </policyMap>
    </destinationPolicy> 





    <!-- 
        The managementContext is used to configure how ActiveMQ is exposed in 
        JMX. By default, ActiveMQ uses the MBean server that is started by 
        the JVM. For more information, see: 

        http://activemq.apache.org/jmx.html 
    -->
    <managementContext>
        <managementContext createConnector="false"/>
    </managementContext>

    <networkConnectors>
        <networkConnector name="tomer-amq-test1" uri="static:(tcp://tomer-amq-test1:61616)" networkTTL="3"/>
    </networkConnectors>


    <!-- 
        Configure message persistence for the broker. The default persistence
        mechanism is the KahaDB store (identified by the kahaDB tag). 
        For more information, see: 

        http://activemq.apache.org/persistence.html 
    -->
    <persistenceAdapter>
        <kahaDB directory="${activemq.base}/data/kahadb"/>
    </persistenceAdapter>


      <!--
        The systemUsage controls the maximum amount of space the broker will 
        use before slowing down producers. For more information, see:

        http://activemq.apache.org/producer-flow-control.html

    <systemUsage>
        <systemUsage>
            <memoryUsage>
                <memoryUsage limit="500 mb"/>
            </memoryUsage>
            <storeUsage>
                <storeUsage limit="1 gb"/>
            </storeUsage>
            <tempUsage>
                <tempUsage limit="500 mb"/>
            </tempUsage>
        </systemUsage>
    </systemUsage>
    -->


    <!-- 
        The transport connectors expose ActiveMQ over a given protocol to
        clients and other brokers. For more information, see: 

        http://activemq.apache.org/configuring-transports.html 
    -->
    <transportConnectors>
        <transportConnector name="tomer-amq-test2" uri="tcp://0.0.0.0:61616"/>
    </transportConnectors>

</broker>

<!-- 
    Enable web consoles, REST and Ajax APIs and demos

    Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details 
-->
<import resource="jetty.xml"/>

</beans>
我错了吗? 我是否需要使用一些特殊配置? 有人能解释一下流程吗

德克萨斯州
总的来说,当消息被传输到不同的代理,然后被发送到消费者时,在调试中运行会使服务器的速度减慢很多,因此会出现容量问题。 一旦我将log level设置为info,两种解决方案的容量似乎是相同的