Сеть брокеров ActiveMQ увеличила время ожидания - PullRequest
1 голос
/ 29 января 2012

Я настроил сеть брокеров ActiveMQ, которая, кажется, работает нормально, функционирует мудро.
Однако емкость сообщений, отправляемых от производителя, который подключен к брокеру a, к потребителю, который подключен к брокеру b, примерно в три раза хуже, чем для производителя / потребителя, подключенного к одному и тому же брокеру.
Мне это кажется странным, так как у меня сложилось впечатление, что как только брокер a передает сообщение брокеру b, это доставленное сообщение(от брокера 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>

Я не прав?
Есть ли какая-то специальная конфигурация, которую я должен использовать?
Может кто-то пролить свет натечь?

Tx Tomer

1 Ответ

0 голосов
/ 30 января 2012

Кажется, что работа в режиме отладки значительно замедлит работу серверов, когда сообщение передается другому брокеру, а затем отправляется потребителю, отсюда и проблема с емкостью.
Как только я установил уровень логирования в info, емкость обоих решений кажется одинаковой.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...