A static connector, having multiple IP addresses, will force the broker to
connect to *all* the brokers whose IP addresses are listed in the connector.
It is the client failover connector that, by default, randomly chooses one
of the listed IP addresses/brokers (i.e., is more than one is provided). For
example,
failover:(tcp://localhost:61616,tcp://remotehost:61616)
Joe
Goto www.ttmsolutions.com for a free ActiveMQ user guide
toff wrote:
>
> Dear activeMQ gurus,
>
> although I have not yet found an answer, this question is related to
> posts:
>
> (1)
> http://www.nabble.com/Network-of-Brokers-configuration-limitation--td11639335s2354.html#a11639335
>
> and
>
> (2)
> http://www.nabble.com/Network-of-Brokers-...-td2921710s2354.html#a3114441
>
> I am testing the behavior of our in-house implementation of a
> content-based routing solution (e.g., pub-sub: that is topics and not
> queues) against the performances of an activeMQ network of brokers. My
> question is: what is the best (in terms of performances and message
> duplicates) configuration I can use for a cyclic network?
>
> To start simple I am using the following topology:
> S1--S3
> | |
> S2--S4
>
> The configuration file for S1 is therefore:
>
> <beans
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:amq="http://activemq.org/config/1.0"
> 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.org/config/1.0
> http://activemq.apache.org/schema/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.org/config/1.0" useJmx="false"
> brokerName="node33" persistent="false">
> <transportConnectors>
> <transportConnector name="local" uri="tcp://localhost:17701"/>
> </transportConnectors>
> <networkConnectors>
> <networkConnector name="S2" dynamicOnly="true" networkTTL="15"
> uri="static://(tcp://node34:17702)"/>
> <networkConnector name="S3" dynamicOnly="true" networkTTL="15"
> uri="static://(tcp://node35:17703)"/>
> </networkConnectors>
> </broker>
> <commandAgent xmlns="http://activemq.org/config/1.0"/>
> </beans>
>
> In contrast to post (1) and from what I gather from
> http://activemq.apache.org/networks-of-brokers.html , I am specifying
> multiple network connectors as I want S1 to be connected to both S1 and
> S2. If I understand correctly, a static URI with multiple addresses (e.g.,
> uri="static:(tcp://localhost:61616,tcp://remotehost:61616,tcp://..)")
> results in a random connection to just one of the provided addresses.
>
> Is this the right way to do it?
> From the client logs I would definitely say no, as each client receives
> multiple (thousands!) copies of the same message.
>
> Are cyclic topologies supported? Could someone please suggest a
> configuration for them?
>
> Or should I just use hierarchical topologies?
>
> The latter is the conclusion I infer from post (2), but if there's
> somebody knowledgeable about this out there I'd be really happy to have a
> final word on this issue.
>
> Thanks in advance,
>
> Gio
>
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Cyclic-network-of-brokers%3A-configuration-and-duplicates-tp16834569s2354p16834692.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
|