You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by David Borja <ad...@gmail.com> on 2007/02/23 17:48:23 UTC

Network of brokers configuration ...

Hi ...

This is my scenario :

I hava a broker called "dllo-aborja" and other one called "localhost2".

I need that all messages that i put on some queue in dllo-aborja broker,
forward to localhost2 broker, including the queues ...

This is my config ..


<networkConnectors>
    <networkConnector
        uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
        failover="true" name="bridge" dynamicOnly="false"
        conduitSubscriptions="true" decreaseNetworkConsumerPriority="false"
        networkTTL="99">
        <excludedDestinations>
            <queue physicalName="exclude.test.foo" />
                <topic physicalName="exclude.test.bar" />
            </excludedDestinations>
            <dynamicallyIncludedDestinations>
                <queue physicalName="" />
            </dynamicallyIncludedDestinations>
    </networkConnector>
</networkConnectors>


What i am missing in the configuration above ??


Thanx!!!

Re: Network of brokers configuration ...

Posted by David Borja <ad...@gmail.com>.
Some ideas??

Thanx!!!

On 2/23/07, David Borja <ad...@gmail.com> wrote:
>
> This is the "dllo-aborja" broker config file:
>
>
> <beans>
>
>     <!-- Allows us to use system properties as variables in this
> configuration file -->
>     <bean
>         class="
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
>
>     <broker xmlns="http://activemq.org/config/1.0 ">
>         <memoryManager>
>             <usageManager id="memory-manager" limit="50 MB" />
>         </memoryManager>
>
>         <!-- In ActiveMQ 4, you can setup destination policies -->
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>
>                     <policyEntry topic="FOO.>">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy />
>                         </dispatchPolicy>
>                         <subscriptionRecoveryPolicy>
>                             <lastImageSubscriptionRecoveryPolicy />
>                         </subscriptionRecoveryPolicy>
>                     </policyEntry>
>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
>
>         <persistenceAdapter>
>             <jdbcPersistenceAdapter dataDirectory="amq_data"
>                 dataSource="#mysql-ds" />
>
>         </persistenceAdapter>
>
>         <transportConnectors>
>             <!--<transportConnector name="default"
>                 uri="tcp://localhost:61616"
> discoveryUri="multicast://default" /> -->
>             <transportConnector name="openwire"
>                 uri="tcp://localhost:61616"
> discoveryUri="multicast://default" />
>             <transportConnector name="stomp"
>                 uri="stomp://localhost:61613" />
>         </transportConnectors>
>
>         <!-- <networkConnectors> -->
>         <networkConnectors>
>             <networkConnector
>
> uri="static://(tcp://dllo-aborja:61616,tcp://192.168.147.145:61616)"
>                 failover="true" name="bridge" dynamicOnly="false"
>                 conduitSubscriptions="true"
> decreaseNetworkConsumerPriority="false"
>                 networkTTL="99">
>                 <excludedDestinations>
>                     <queue physicalName=" exclude.test.foo" />
>                     <topic physicalName="exclude.test.bar " />
>                 </excludedDestinations>
>                 <dynamicallyIncludedDestinations>
>                     <queue physicalName="" />
>                 </dynamicallyIncludedDestinations>
>             </networkConnector>
>         </networkConnectors>
>     </broker>
>
>     <!-- MySql DataSource Sample Setup -->
>     <bean id="mysql-ds" class=" org.apache.commons.dbcp.BasicDataSource"
>         destroy-method="close">
>         <property name="driverClassName" value="com.mysql.jdbc.Driver " />
>         <property name="url"
>             value="jdbc:mysql://dllo-aborja/activemq?relaxAutoCommit=true"
> />
>         <property name="username" value="user" />
>         <property name="password" value="passwd" />
>         <property name="poolPreparedStatements" value="true" />
>     </bean>
>
> </beans>
>
>
> And this is the "localhost2" config file:
>
> <beans>
>   <bean class="
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>
>   <broker brokerName="localhost2" useJmx="true" xmlns="
> http://activemq.org/config/1.0">
>
>     <destinationPolicy>
>       <policyMap><policyEntries>
>
>           <policyEntry topic="FOO.>">
>             <dispatchPolicy>
>               <strictOrderDispatchPolicy />
>             </dispatchPolicy>
>             <subscriptionRecoveryPolicy>
>               <lastImageSubscriptionRecoveryPolicy />
>             </subscriptionRecoveryPolicy>
>           </policyEntry>
>
>       </policyEntries></policyMap>
>     </destinationPolicy>
>
>
>     <persistenceAdapter>
>         <journaledJDBC journalLogFiles="5" dataDirectory="${activemq.base
> }/activemq-data"/>
>     </persistenceAdapter>
>
>     <transportConnectors>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>     </transportConnectors>
>
>     <networkConnectors>
>       <networkConnector name="default-nc" uri="multicast://default"/>
>     </networkConnectors>
>
>   </broker>
>
> </beans>
>
> Thanx!!!
>
>
> On 2/23/07, Adrian Co <aco@exist.com > wrote:
> >
> > Could paste the config of both brokers?
> >
> > David Borja wrote:
> > > Hi ...
> > >
> > > I have a MessageListener listening on broker "localhost2" on a queue
> > > called
> > > "jms/bridge".
> > >
> > > With the configuration above, i send a message to a queue called
> > > "jms/bridge" on broker "dllo-aborja". The message listener does't
> > receive
> > > anything ... why ??
> > >
> > >
> > > Thanx!!
> > >
> > >
> > > On 2/23/07, Adrian Co < aco@exist.com> wrote:
> > >>
> > >> AFAIK, by default the network connector uses a demand forwarding
> > bridge,
> > >> and will forward messages only when there is an interested consumer
> > on
> > >> the remote broker only.
> > >>
> > >> I know there is a standard forwarding bridge, but I'm not sure how to
> > >> configure it in xbean. Sorry. :(
> > >>
> > >>
> > >> David Borja wrote:
> > >> > Hi ...
> > >> >
> > >> > This is my scenario :
> > >> >
> > >> > I hava a broker called "dllo-aborja" and other one called
> > >> "localhost2".
> > >> >
> > >> > I need that all messages that i put on some queue in dllo-aborja
> > >> broker,
> > >> > forward to localhost2 broker, including the queues ...
> > >> >
> > >> > This is my config ..
> > >> >
> > >> >
> > >> > <networkConnectors>
> > >> >    <networkConnector
> > >>
> > >> >
> > >> uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
> > >> >        failover="true" name="bridge" dynamicOnly="false"
> > >> >        conduitSubscriptions="true"
> > >> > decreaseNetworkConsumerPriority="false"
> > >> >        networkTTL="99">
> > >> >        <excludedDestinations>
> > >> >            <queue physicalName="exclude.test.foo" />
> > >> >                <topic physicalName="exclude.test.bar" />
> > >> >            </excludedDestinations>
> > >> >            <dynamicallyIncludedDestinations>
> > >> >                <queue physicalName="" />
> > >> >            </dynamicallyIncludedDestinations>
> > >> >    </networkConnector>
> > >> > </networkConnectors>
> > >> >
> > >> >
> > >> > What i am missing in the configuration above ??
> > >> >
> > >> >
> > >> > Thanx!!!
> > >> >
> > >>
> > >>
> > >
> >
> >
>

Re: Network of brokers configuration ...

Posted by David Borja <ad...@gmail.com>.
This is the "dllo-aborja" broker config file:


<beans>

    <!-- Allows us to use system properties as variables in this
configuration file -->
    <bean
        class="
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />

    <broker xmlns="http://activemq.org/config/1.0">
        <memoryManager>
            <usageManager id="memory-manager" limit="50 MB" />
        </memoryManager>

        <!-- In ActiveMQ 4, you can setup destination policies -->
        <destinationPolicy>
            <policyMap>
                <policyEntries>

                    <policyEntry topic="FOO.>">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy />
                        </dispatchPolicy>
                        <subscriptionRecoveryPolicy>
                            <lastImageSubscriptionRecoveryPolicy />
                        </subscriptionRecoveryPolicy>
                    </policyEntry>

                </policyEntries>
            </policyMap>
        </destinationPolicy>


        <persistenceAdapter>
            <jdbcPersistenceAdapter dataDirectory="amq_data"
                dataSource="#mysql-ds" />

        </persistenceAdapter>

        <transportConnectors>
            <!--<transportConnector name="default"
                uri="tcp://localhost:61616"
discoveryUri="multicast://default" /> -->
            <transportConnector name="openwire"
                uri="tcp://localhost:61616"
discoveryUri="multicast://default" />
            <transportConnector name="stomp"
                uri="stomp://localhost:61613" />
        </transportConnectors>

        <!-- <networkConnectors> -->
        <networkConnectors>
            <networkConnector

uri="static://(tcp://dllo-aborja:61616,tcp://192.168.147.145:61616)"
                failover="true" name="bridge" dynamicOnly="false"
                conduitSubscriptions="true"
decreaseNetworkConsumerPriority="false"
                networkTTL="99">
                <excludedDestinations>
                    <queue physicalName="exclude.test.foo" />
                    <topic physicalName="exclude.test.bar" />
                </excludedDestinations>
                <dynamicallyIncludedDestinations>
                    <queue physicalName="" />
                </dynamicallyIncludedDestinations>
            </networkConnector>
        </networkConnectors>
    </broker>

    <!-- MySql DataSource Sample Setup -->
    <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
        destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <property name="url"
            value="jdbc:mysql://dllo-aborja/activemq?relaxAutoCommit=true"
/>
        <property name="username" value="user" />
        <property name="password" value="passwd" />
        <property name="poolPreparedStatements" value="true" />
    </bean>

</beans>


And this is the "localhost2" config file:

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

  <broker brokerName="localhost2" useJmx="true" xmlns="
http://activemq.org/config/1.0">

    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>


    <persistenceAdapter>
        <journaledJDBC journalLogFiles="5" dataDirectory="${activemq.base
}/activemq-data"/>
    </persistenceAdapter>

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>

    <networkConnectors>
      <networkConnector name="default-nc" uri="multicast://default"/>
    </networkConnectors>

  </broker>

</beans>

Thanx!!!


On 2/23/07, Adrian Co <ac...@exist.com> wrote:
>
> Could paste the config of both brokers?
>
> David Borja wrote:
> > Hi ...
> >
> > I have a MessageListener listening on broker "localhost2" on a queue
> > called
> > "jms/bridge".
> >
> > With the configuration above, i send a message to a queue called
> > "jms/bridge" on broker "dllo-aborja". The message listener does't
> receive
> > anything ... why ??
> >
> >
> > Thanx!!
> >
> >
> > On 2/23/07, Adrian Co <ac...@exist.com> wrote:
> >>
> >> AFAIK, by default the network connector uses a demand forwarding
> bridge,
> >> and will forward messages only when there is an interested consumer on
> >> the remote broker only.
> >>
> >> I know there is a standard forwarding bridge, but I'm not sure how to
> >> configure it in xbean. Sorry. :(
> >>
> >>
> >> David Borja wrote:
> >> > Hi ...
> >> >
> >> > This is my scenario :
> >> >
> >> > I hava a broker called "dllo-aborja" and other one called
> >> "localhost2".
> >> >
> >> > I need that all messages that i put on some queue in dllo-aborja
> >> broker,
> >> > forward to localhost2 broker, including the queues ...
> >> >
> >> > This is my config ..
> >> >
> >> >
> >> > <networkConnectors>
> >> >    <networkConnector
> >>
> >> >
> >> uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
> >> >        failover="true" name="bridge" dynamicOnly="false"
> >> >        conduitSubscriptions="true"
> >> > decreaseNetworkConsumerPriority="false"
> >> >        networkTTL="99">
> >> >        <excludedDestinations>
> >> >            <queue physicalName="exclude.test.foo" />
> >> >                <topic physicalName="exclude.test.bar" />
> >> >            </excludedDestinations>
> >> >            <dynamicallyIncludedDestinations>
> >> >                <queue physicalName="" />
> >> >            </dynamicallyIncludedDestinations>
> >> >    </networkConnector>
> >> > </networkConnectors>
> >> >
> >> >
> >> > What i am missing in the configuration above ??
> >> >
> >> >
> >> > Thanx!!!
> >> >
> >>
> >>
> >
>
>

Re: Network of brokers configuration ...

Posted by Adrian Co <ac...@exist.com>.
Could paste the config of both brokers?

David Borja wrote:
> Hi ...
>
> I have a MessageListener listening on broker "localhost2" on a queue 
> called
> "jms/bridge".
>
> With the configuration above, i send a message to a queue called
> "jms/bridge" on broker "dllo-aborja". The message listener does't receive
> anything ... why ??
>
>
> Thanx!!
>
>
> On 2/23/07, Adrian Co <ac...@exist.com> wrote:
>>
>> AFAIK, by default the network connector uses a demand forwarding bridge,
>> and will forward messages only when there is an interested consumer on
>> the remote broker only.
>>
>> I know there is a standard forwarding bridge, but I'm not sure how to
>> configure it in xbean. Sorry. :(
>>
>>
>> David Borja wrote:
>> > Hi ...
>> >
>> > This is my scenario :
>> >
>> > I hava a broker called "dllo-aborja" and other one called 
>> "localhost2".
>> >
>> > I need that all messages that i put on some queue in dllo-aborja 
>> broker,
>> > forward to localhost2 broker, including the queues ...
>> >
>> > This is my config ..
>> >
>> >
>> > <networkConnectors>
>> >    <networkConnector
>>
>> >        
>> uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
>> >        failover="true" name="bridge" dynamicOnly="false"
>> >        conduitSubscriptions="true"
>> > decreaseNetworkConsumerPriority="false"
>> >        networkTTL="99">
>> >        <excludedDestinations>
>> >            <queue physicalName="exclude.test.foo" />
>> >                <topic physicalName="exclude.test.bar" />
>> >            </excludedDestinations>
>> >            <dynamicallyIncludedDestinations>
>> >                <queue physicalName="" />
>> >            </dynamicallyIncludedDestinations>
>> >    </networkConnector>
>> > </networkConnectors>
>> >
>> >
>> > What i am missing in the configuration above ??
>> >
>> >
>> > Thanx!!!
>> >
>>
>>
>


Re: Network of brokers configuration ...

Posted by David Borja <ad...@gmail.com>.
Hi ...

I have a MessageListener listening on broker "localhost2" on a queue called
"jms/bridge".

With the configuration above, i send a message to a queue called
"jms/bridge" on broker "dllo-aborja". The message listener does't receive
anything ... why ??


Thanx!!


On 2/23/07, Adrian Co <ac...@exist.com> wrote:
>
> AFAIK, by default the network connector uses a demand forwarding bridge,
> and will forward messages only when there is an interested consumer on
> the remote broker only.
>
> I know there is a standard forwarding bridge, but I'm not sure how to
> configure it in xbean. Sorry. :(
>
>
> David Borja wrote:
> > Hi ...
> >
> > This is my scenario :
> >
> > I hava a broker called "dllo-aborja" and other one called "localhost2".
> >
> > I need that all messages that i put on some queue in dllo-aborja broker,
> > forward to localhost2 broker, including the queues ...
> >
> > This is my config ..
> >
> >
> > <networkConnectors>
> >    <networkConnector
>
> >        uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
> >        failover="true" name="bridge" dynamicOnly="false"
> >        conduitSubscriptions="true"
> > decreaseNetworkConsumerPriority="false"
> >        networkTTL="99">
> >        <excludedDestinations>
> >            <queue physicalName="exclude.test.foo" />
> >                <topic physicalName="exclude.test.bar" />
> >            </excludedDestinations>
> >            <dynamicallyIncludedDestinations>
> >                <queue physicalName="" />
> >            </dynamicallyIncludedDestinations>
> >    </networkConnector>
> > </networkConnectors>
> >
> >
> > What i am missing in the configuration above ??
> >
> >
> > Thanx!!!
> >
>
>

Re: Network of brokers configuration ...

Posted by Adrian Co <ac...@exist.com>.
AFAIK, by default the network connector uses a demand forwarding bridge, 
and will forward messages only when there is an interested consumer on 
the remote broker only.

I know there is a standard forwarding bridge, but I'm not sure how to 
configure it in xbean. Sorry. :(


David Borja wrote:
> Hi ...
>
> This is my scenario :
>
> I hava a broker called "dllo-aborja" and other one called "localhost2".
>
> I need that all messages that i put on some queue in dllo-aborja broker,
> forward to localhost2 broker, including the queues ...
>
> This is my config ..
>
>
> <networkConnectors>
>    <networkConnector
>        uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
>        failover="true" name="bridge" dynamicOnly="false"
>        conduitSubscriptions="true" 
> decreaseNetworkConsumerPriority="false"
>        networkTTL="99">
>        <excludedDestinations>
>            <queue physicalName="exclude.test.foo" />
>                <topic physicalName="exclude.test.bar" />
>            </excludedDestinations>
>            <dynamicallyIncludedDestinations>
>                <queue physicalName="" />
>            </dynamicallyIncludedDestinations>
>    </networkConnector>
> </networkConnectors>
>
>
> What i am missing in the configuration above ??
>
>
> Thanx!!!
>


Re: [Spam: 5.0] Network of brokers configuration ...

Posted by David Borja <ad...@gmail.com>.
Hi ..

I still get the same problem !!!!

any other idea??




On 2/23/07, naga007 <NS...@gmail.com> wrote:
>
>
>
> change this in includedestinations and try to see if t works.
>
> <queue physicalName=">" />
>
>
> David Borja-2 wrote:
> >
> > Hi ...
> >
> > This is my scenario :
> >
> > I hava a broker called "dllo-aborja" and other one called "localhost2".
> >
> > I need that all messages that i put on some queue in dllo-aborja broker,
> > forward to localhost2 broker, including the queues ...
> >
> > This is my config ..
> >
> >
> > <networkConnectors>
> >     <networkConnector
> >
> uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
> >         failover="true" name="bridge" dynamicOnly="false"
> >         conduitSubscriptions="true"
> > decreaseNetworkConsumerPriority="false"
> >         networkTTL="99">
> >         <excludedDestinations>
> >             <queue physicalName="exclude.test.foo" />
> >                 <topic physicalName="exclude.test.bar" />
> >             </excludedDestinations>
> >             <dynamicallyIncludedDestinations>
> >                 <queue physicalName="" />
> >             </dynamicallyIncludedDestinations>
> >     </networkConnector>
> > </networkConnectors>
> >
> >
> > What i am missing in the configuration above ??
> >
> >
> > Thanx!!!
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Network-of-brokers-configuration-...-tf3279896s2354.html#a9127083
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: [Spam: 5.0] Network of brokers configuration ...

Posted by naga007 <NS...@gmail.com>.

change this in includedestinations and try to see if t works.

 <queue physicalName=">" /> 


David Borja-2 wrote:
> 
> Hi ...
> 
> This is my scenario :
> 
> I hava a broker called "dllo-aborja" and other one called "localhost2".
> 
> I need that all messages that i put on some queue in dllo-aborja broker,
> forward to localhost2 broker, including the queues ...
> 
> This is my config ..
> 
> 
> <networkConnectors>
>     <networkConnector
>         uri="static://(tcp://localhost:61616,tcp://192.168.147.145:61616)"
>         failover="true" name="bridge" dynamicOnly="false"
>         conduitSubscriptions="true"
> decreaseNetworkConsumerPriority="false"
>         networkTTL="99">
>         <excludedDestinations>
>             <queue physicalName="exclude.test.foo" />
>                 <topic physicalName="exclude.test.bar" />
>             </excludedDestinations>
>             <dynamicallyIncludedDestinations>
>                 <queue physicalName="" />
>             </dynamicallyIncludedDestinations>
>     </networkConnector>
> </networkConnectors>
> 
> 
> What i am missing in the configuration above ??
> 
> 
> Thanx!!!
> 
> 

-- 
View this message in context: http://www.nabble.com/Network-of-brokers-configuration-...-tf3279896s2354.html#a9127083
Sent from the ActiveMQ - User mailing list archive at Nabble.com.