activemq rede de mensagens do corretor não fluindo

1

activemq 5.12

Rede de configuração do intermediário: hub, spoke1, spoke2

spoke1 possui uma conexão duplex n / w para o hub spoke2 possui uma conexão de rede duplex para o hub

Eu uso o seguinte para produzir no spoke1

Produtor

bin / activemq --brokerurl tcp: //0.0.0.0: 61616 - fila de destino: // produtor-214 --messagecount 100 --message "hi there" Então no spoke2, tento consumir mensagens

bin / activemq consumer --brokerUrl tcp: / / 0.0.0.0: 61616 - fila de destino: // produtor-214 Eu posso ver que 100 mensagens são enfileiradas no spoke1, mas meu consumidor não vê nenhuma das mensagens e apenas espera assim

INFO | Conectando-se ao URL: tcp: //0.0.0.0: 61616 (null: null) INFO | Fila de consumo: // produtor-214 INFO | Dormir entre recebe 0 ms INFO | Executando 1 threads paralelos INFO | consumer-1 espera até que 1.000 mensagens sejam consumidas Minha configuração para spoke1 / 2 é idêntica, exceto para brokername. A seguir está a configuração para spoke2:

link link link " >

             arquivo: $ {activemq.conf} /credentials.properties       elemento é usado para configurar o agente do ActiveMQ. - >

<destinationPolicy>
    <policyMap>
      <policyEntries>
        <policyEntry topic=">" >
            <!-- The constantPendingMessageLimitStrategy is used to prevent
                 slow topic consumers to block producers and affect other consumers
                 by limiting the number of messages that are retained
                 For more information, see:

                 http://activemq.apache.org/slow-consumer-handling.html

            -->
          <pendingMessageLimitStrategy>
            <constantPendingMessageLimitStrategy limit="1000"/>
          </pendingMessageLimitStrategy>
        </policyEntry>
      </policyEntries>
    </policyMap>
</destinationPolicy>

             

<networkConnectors>
    <networkConnector uri="static:(tcp://172.31.10.24:61616)?transport.useInactivityMonitor=false" duplex="true"/>
</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.data}/kahadb"/>
</persistenceAdapter>


  <!--
    The systemUsage controls the maximum amount of space the broker will
    use before disabling caching and/or slowing down producers. For more information, see:
    http://activemq.apache.org/producer-flow-control.html
  -->
  <systemUsage>
    <systemUsage>
        <memoryUsage>
            <memoryUsage percentOfJvmHeap="70" />
        </memoryUsage>
        <storeUsage>
            <storeUsage limit="100 gb"/>
        </storeUsage>
        <tempUsage>
            <tempUsage limit="50 gb"/>
        </tempUsage>
    </systemUsage>
</systemUsage>
<transportConnectors>
    <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors>

<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
    <bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" />
</shutdownHooks>

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

Qualquer ajuda será apreciada

Atenciosamente

    
por mg03 17.02.2016 / 02:37

1 resposta

1

O problema era que eu tinha networkTTL = 1 assim que eu criava networkTTL = 2 no conector do trabalho de rede, as mensagens podiam ser lidas do spoke2

Obrigado

    
por 17.02.2016 / 03:02

Tags