You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by egetchell <er...@distributedlogic.com> on 2008/01/10 22:23:50 UTC
Defining Multiple Network Connectors in a Network of Brokers
All,
Another question on Network of Brokers. How exactly does one set up
multiple connections between two brokers? The documentation indicates that
defining multiple network connectors in the broker configuration should
achieve this, but we seem to be unable to correctly configure this.
Again, using Broker A and Broker B as the two brokers, I’ve tried the
following configuration (using Broker A’s configuration below) with the
following results:
I first tried defining multiple <networkConnector> elments pointing to the
same machine
<transportConnectors>
<transportConnector name="default-tc1" uri="tcp://localhost:61616" />
</transportConnectors>
<networkConnectors>
<networkConnector name="default-nc1" uri="static://(tcp://machineB:61616)"
dynamicOnly="true"/>
<networkConnector name="default-nc2" uri="static://(tcp://machineB:61616)"
dynamicOnly="true"/>
</networkConnectors>
The above errors out with a multiple ports in use exception at startup.
I then tried two network connectors on different ports:
<transportConnectors>
<!—two transports are defined here as BrokerB also has a two port
connection back
<transportConnector name="default-tc1" uri="tcp://localhost:61616" />
<transportConnector name="default-tc2" uri="tcp://localhost:61617" />
</transportConnectors>
<networkConnectors>
<networkConnector name="default-nc1" uri="static://(tcp://machineB:61616)"
dynamicOnly="true"/>
<networkConnector name="default-nc2" uri="static://(tcp://machineB:61617)"
dynamicOnly="true"/>
</networkConnectors>
However, when the second broker starts both would exception:
Broker A’s exception:
WARN TransportConnection - Failed to add Connection
javax.jms.InvalidClientIDException: Broker: BrokerB - Client:
NC_BrokerA_outbound already connected from /192.168.10.167:1473
Broker B’s exception:
WARN TransportConnection - Failed to add Connection
javax.jms.InvalidClientIDException: Broker: BrokerA - Client:
NC_BrokerB_outbound already connected from /192.168.10.164:4134
I then tried
<networkConnectors>
<networkConnector name="default-nc1" uri="static://(tcp://machineB:61616,
tcp://machineB:61616)" dynamicOnly="true"/>
</networkConnector>
…no exception, but I believe that this just drops into a round-robin scheme
and netstating the connections, I did not see multiple connections between
the two boxes.
Lastly, I tried adding multiple Network Connectors,
<networkConnectors>
<!—configuration goes here -->
</networkConnectors>
<networkConnectors>
<!—configuration goes here -->
</networkConnectors>
However, I found that only the last <networkConnectors> element is read by
ActiveMQ, so the first elements configuration is ignored or overwritten.
Any thoughts? I believe that when I figure out the configuration error, I
should see multiple outbound connections via netstat, correct?
Thanks,
Eric
--
View this message in context: http://www.nabble.com/Defining-Multiple-Network-Connectors-in-a-Network-of-Brokers-tp14744240s2354p14744240.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Defining Multiple Network Connectors in a Network of Brokers
Posted by egetchell <er...@distributedlogic.com>.
Reading the Network of Brokers page, the following is what sent us down this
path:
"It is possible to have more than one network connector between two brokers.
Each network connector uses one underlying transport connection, so you may
wish to do this to increase throughput, or have a more flexible
configuration."
I interpreted the above to a design similar to, say telnet, FTP, or SSH.
You can have multiple connections established from a single client. Would
it be possible to provide clarification on the above?
During testing we seem to be saturating broker A at around 2000 messages a
second, but the CPU of the box was only at 30%. Our solution was to add in
another "A" broker, yielding the following:
A1 --->
B
A2 --->
And this seemed to increase our throughput. Mind you this is a very
simplified version of our topology.
Thanks,
Eric
We don't support multiple directional connections between two brokers
- i.e.
We support:
--->
A B
<---
but not
---->
A B
--->
--
View this message in context: http://www.nabble.com/Defining-Multiple-Network-Connectors-in-a-Network-of-Brokers-tp14744240s2354p14804190.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Defining Multiple Network Connectors in a Network of Brokers
Posted by Rob Davies <ra...@gmail.com>.
We don't support multiple directional connections between two brokers
- i.e.
We support:
--->
A B
<---
but not
---->
A B
--->
On Jan 10, 2008, at 9:23 PM, egetchell wrote:
>
> All,
>
> Another question on Network of Brokers. How exactly does one set up
> multiple connections between two brokers? The documentation
> indicates that
> defining multiple network connectors in the broker configuration
> should
> achieve this, but we seem to be unable to correctly configure this.
>
> Again, using Broker A and Broker B as the two brokers, I’ve tried
> the
> following configuration (using Broker A’s configuration below) with
> the
> following results:
>
> I first tried defining multiple <networkConnector> elments pointing
> to the
> same machine
> <transportConnectors>
> <transportConnector name="default-tc1" uri="tcp://localhost:
> 61616" />
> </transportConnectors>
> <networkConnectors>
> <networkConnector name="default-nc1" uri="static://(tcp://machineB:
> 61616)"
> dynamicOnly="true"/>
> <networkConnector name="default-nc2" uri="static://(tcp://machineB:
> 61616)"
> dynamicOnly="true"/>
> </networkConnectors>
> The above errors out with a multiple ports in use exception at
> startup.
>
> I then tried two network connectors on different ports:
> <transportConnectors>
> <!—two transports are defined here as BrokerB also has a two port
> connection back
> <transportConnector name="default-tc1" uri="tcp://localhost:
> 61616" />
> <transportConnector name="default-tc2" uri="tcp://localhost:61617" />
> </transportConnectors>
> <networkConnectors>
> <networkConnector name="default-nc1" uri="static://(tcp://machineB:
> 61616)"
> dynamicOnly="true"/>
> <networkConnector name="default-nc2" uri="static://(tcp://machineB:
> 61617)"
> dynamicOnly="true"/>
> </networkConnectors>
>
> However, when the second broker starts both would exception:
> Broker A’s exception:
> WARN TransportConnection - Failed to add Connection
> javax.jms.InvalidClientIDException: Broker: BrokerB - Client:
> NC_BrokerA_outbound already connected from /192.168.10.167:1473
>
> Broker B’s exception:
> WARN TransportConnection - Failed to add Connection
> javax.jms.InvalidClientIDException: Broker: BrokerA - Client:
> NC_BrokerB_outbound already connected from /192.168.10.164:4134
>
> I then tried
> <networkConnectors>
> <networkConnector name="default-nc1" uri="static://(tcp://machineB:
> 61616,
> tcp://machineB:61616)" dynamicOnly="true"/>
> </networkConnector>
> …no exception, but I believe that this just drops into a round-
> robin scheme
> and netstating the connections, I did not see multiple connections
> between
> the two boxes.
>
> Lastly, I tried adding multiple Network Connectors,
> <networkConnectors>
> <!—configuration goes here -->
> </networkConnectors>
> <networkConnectors>
> <!—configuration goes here -->
> </networkConnectors>
> However, I found that only the last <networkConnectors> element is
> read by
> ActiveMQ, so the first elements configuration is ignored or
> overwritten.
>
> Any thoughts? I believe that when I figure out the configuration
> error, I
> should see multiple outbound connections via netstat, correct?
>
> Thanks,
>
> Eric
>
> --
> View this message in context: http://www.nabble.com/Defining-Multiple-Network-Connectors-in-a-Network-of-Brokers-tp14744240s2354p14744240.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>