On Fri, Sep 4, 2009 at 5:43 PM, themitchy<mitch.gran...@sophos.com> wrote:
>
> I've followed the example in
> http://activemq.apache.org/networks-of-brokers.html for multicast discovery.
> I have two brokers set up that way (let's call them A and B).  I'm sending
> messages to /queue/foo on broker A.  I have something subscribing to
> /queue/foo on broker B but it doesn't get the messages forwarded from A.
>
> Am I oversimplifying this?  The online docs give next to no information on
> this but the example mentioned above seemed pretty straightforward.  What am
> I missing?

It would help if you provided your configuration. Also what version of
ActiveMQ are you using?

Attached are two configurations for two brokers that form a network
between the two brokers. Using these two configs, you can produce
messages to one broker and consume messages from the other broker. I'm
CC'ing you directly to make sure you get the attachments. These
configurations will work with ActiveMQ 5.x.

Bruce
-- 
perl -e 'print 
unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder
<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   
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker xmlns="http://activemq.apache.org/schema/core"; brokerName="amq5A"
    dataDirectory="${activemq.base}/data" useJmx="true">

      <plugins>
        <loggingBrokerPlugin />
      </plugins>

        <managementContext>
            <managementContext connectorPort="1091" createConnector="false"/>
        </managementContext>

        <networkConnectors>
            <!-- 
            The following connector is all that's needed for the broker
            network because of the duplex attribute which enables bi-directional
            communication on a single connector 
            -->
            <networkConnector name="amq5A-default-nc" duplex="true" uri="static://(tcp://localhost:61612)"/>
        </networkConnectors>

        <persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb"/>
        </persistenceAdapter>

        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="128 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61611" />
        </transportConnectors>

    </broker>

    <!--
    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0";>
        <connectors>
            <nioConnector port="8161"/>
        </connectors>

        <handlers>
            <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
        </handlers>
    </jetty>
    -->

</beans>
<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   
  http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd";>

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker xmlns="http://activemq.apache.org/schema/core"; brokerName="amq5B"
    dataDirectory="${activemq.base}/data" useJmx="true">

      <plugins>
        <loggingBrokerPlugin />
      </plugins>

        <managementContext>
            <managementContext connectorPort="1092" createConnector="false"/>
        </managementContext>

        <networkConnectors>
            <!--
            networkConnector name="amq5B-default-nc" uri="static://(tcp://localhost:61611,tcp://localhost:61613)"/
            -->

            <!--
            <networkConnector name="amq5B-default-nc" uri="static://(tcp://localhost:61611)"/>
            -->
        </networkConnectors>

        <persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb"/>
        </persistenceAdapter>

        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="128 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>


        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61612" />
        </transportConnectors>

    </broker>

    <!-- 
    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0";>
        <connectors>
            <nioConnector port="8162"/>
        </connectors>

        <handlers>
            <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
        </handlers>
    </jetty>
    -->

</beans>

Reply via email to