Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-2640

Message not forwared in a network broker - ActiveMQ 5.3 & SMX4 - advisorySupport

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 5.3.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Hi,

      I run ActiveMq 5.3 in embedded mode in two SMX4 instances. I have defined a forward network topology to forward messages from master to slave when a client is connected to the slave. No messages are forwarded !

      Where is the issue ?

      Config of Master

         <broker xmlns="http://activemq.apache.org/schema/core" dataDirectory="d:/temp/activemq-data" brokerName="master" useShutdownHook="false" useJmx="true" advisorySupport="false">
      
              <!-- Destination specific policies using destination names or wildcards -->
              <destinationPolicy>
                  <policyMap>
                      <policyEntries>
                          <policyEntry queue=">" memoryLimit="5mb"/>
                          <policyEntry topic=">" memoryLimit="5mb">
                              <subscriptionRecoveryPolicy>
                                  <lastImageSubscriptionRecoveryPolicy/>
                              </subscriptionRecoveryPolicy>
                          </policyEntry>
                      </policyEntries>
                  </policyMap>
              </destinationPolicy>
      
              <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
              <managementContext>
                  <managementContext createConnector="false"/>
              </managementContext>
      
              <!-- The store and forward broker networks ActiveMQ will listen to -->
              <networkConnectors>
                  <!-- by default just auto discover the other brokers
                  <networkConnector name="default-nc" uri="multicast://default"/>
                  -->
                  <!-- Example of a static configuration:
                  <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
                  -->
                  <networkConnector uri="static://(tcp://localhost:61617)"/>
              </networkConnectors>
      
              <!--
              <persistenceAdapter>
                  <amqPersistenceAdapter syncOnWrite="false" directory="d:/temp/activemq/default" maxFileLength="20 mb"/>
              </persistenceAdapter>
              -->
             
              <persistenceAdapter>
                  <!-- Master/Slave
            <kahaDB directory="d:/temp/activemq-data" journalMaxFileLength="32mb"/>
            -->
            <kahaDB directory="d:/temp/activemq-data-master" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
          </persistenceAdapter>
      
              <!-- Use the following if you wish to configure the journal with JDBC -->
              <!--
              <persistenceAdapter>
                  <journaledJDBC dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
              </persistenceAdapter>
              -->
      
              <!-- Or if you want to use pure JDBC without a journal -->
              <!--
              <persistenceAdapter>
                  <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
              </persistenceAdapter>
              -->
      
              <!--  The maximum about of space the broker will use before slowing down producers -->
              <systemUsage>
                  <systemUsage>
                      <memoryUsage>
                          <memoryUsage limit="50 mb"/>
                      </memoryUsage>
                      <storeUsage>
                          <storeUsage limit="1 gb" name="foo"/>
                      </storeUsage>
                      <tempUsage>
                          <tempUsage limit="100 mb"/>
                      </tempUsage>
                  </systemUsage>
              </systemUsage>
      
      
              <!-- The transport connectors ActiveMQ will listen to -->
              <transportConnectors>
                  <!-- <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/> -->
                  <transportConnector name="openwire" uri="tcp://localhost:61616"/>
                  <!-- <transportConnector name="stomp" uri="stomp://localhost:61613"/> -->
              </transportConnectors>
      
          </broker>
      

      Config of the Slave

          <broker xmlns="http://activemq.apache.org/schema/core" dataDirectory="d:/temp/activemq-data" brokerName="slave" useShutdownHook="false" useJmx="true" advisorySupport="false">
         
              <!-- Destination specific policies using destination names or wildcards -->
              <destinationPolicy>
                  <policyMap>
                      <policyEntries>
                          <policyEntry queue=">" memoryLimit="5mb"/>
                          <policyEntry topic=">" memoryLimit="5mb">
                              <subscriptionRecoveryPolicy>
                                  <lastImageSubscriptionRecoveryPolicy/>
                              </subscriptionRecoveryPolicy>
                          </policyEntry>
                      </policyEntries>
                  </policyMap>
              </destinationPolicy>
      
              <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
              <managementContext>
                  <managementContext createConnector="false"/>
              </managementContext>
      
              <!-- The store and forward broker networks ActiveMQ will listen to -->
              <networkConnectors>
                  <!-- by default just auto discover the other brokers
                  <networkConnector name="default-nc" uri="multicast://default"/>
                  -->
                  <!-- Example of a static configuration:
                  <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
                  -->
      
              </networkConnectors>
                     
              <!--
              <persistenceAdapter>
                  <amqPersistenceAdapter syncOnWrite="false" directory="d:/temp/activemq/default" maxFileLength="20 mb"/>
              </persistenceAdapter>
                      -->
                     
                      <persistenceAdapter>
                  <!-- Master/Slave
            <kahaDB directory="d:/temp/activemq-data" journalMaxFileLength="32mb"/>
            -->
            <!-- <kahaDB directory="d:/temp/activemq-data-slave" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/> -->
            <kahaDB directory="d:/temp/activemq-data-slave" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
          </persistenceAdapter>
      
                     
              <!-- Use the following if you wish to configure the journal with JDBC -->
              <!--
              <persistenceAdapter>
                  <journaledJDBC dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
              </persistenceAdapter>
              -->
      
              <!-- Or if you want to use pure JDBC without a journal -->
              <!--
              <persistenceAdapter>
                  <jdbcPersistenceAdapter dataSource="#postgres-ds"/>
              </persistenceAdapter>
              -->
      
              <!--  The maximum about of space the broker will use before slowing down producers -->
              <systemUsage>
                  <systemUsage>
                      <memoryUsage>
                          <memoryUsage limit="50 mb"/>
                      </memoryUsage>
                      <storeUsage>
                          <storeUsage limit="1 gb" name="foo"/>
                      </storeUsage>
                      <tempUsage>
                          <tempUsage limit="100 mb"/>
                      </tempUsage>
                  </systemUsage>
              </systemUsage>
      
              <!-- Configure the broker as a slave
              <services>
                              <masterConnector remoteURI="tcp://localhost:61616" />
                      </services>
                      -->
      
              <!-- The transport connectors ActiveMQ will listen to -->
              <transportConnectors>
                  <!-- <transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/> -->
                  <transportConnector name="openwire" uri="tcp://localhost:61617"/>
                  <!-- <transportConnector name="stomp" uri="stomp://localhost:61613"/> -->
              </transportConnectors>
             
      
          </broker>
      

      Network connection is well established

      17:52:27,090 | INFO | xtenderThread-10 | OsgiBundleXmlApplicationContext | ractOsgiBundleApplicationContext 348 | Not publishing application contex
      t OSGi service for bundle null (activemq-broker.xml)
      17:52:27,090 | INFO | xtenderThread-10 | ContextLoaderListener | BundleApplicationContextListener 45 | Application context successfully
      refreshed (OsgiBundleXmlApplicationContext(bundle=activemq-broker.xml, config=osgibundle:/META-INF/spring/*.xml))
      17:52:27,215 | INFO | r=vm://master#12 | DemandForwardingBridge | rk.DemandForwardingBridgeSupport 303 | Network connection between vm://m
      aster#12 and tcp://localhost/127.0.0.1:61617(slave) has been established.

      but when I connect with the client : ant consumer -Durl="tcp://localhost:61617" -Dqueue=IN on the slave broker

      I don't see anything on the console

      Could it be related to this parameter --> advisorySupport="false" ?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cmoulliard Charles Moulliard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: