You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by tomerb <to...@waze.com> on 2012/01/31 10:14:30 UTC
network of broker - update and rebalance not working
Hi
I'm having trouble making the *updateClusterClients="true"
rebalanceClusterClients="true"* work
I have a network of brokers size 2 with the following brokers configuration
*<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">
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true" persistent="false">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="true"
memoryLimit="5mb">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="true"
memoryLimit="50mb">
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<networkConnectors>
<networkConnector name="tomer1"
uri="static:(tcp://tomer-amq-test1:61616)"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"
updateClusterClients="true" rebalanceClusterClients="true" />
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>*
the client is running
*ant consumer -Dmax=999999 -Durl=failover:\(tcp://tomer-amq-test2:61616\) *
the client always connect only to the specified broker (tomer-amq-test2)
and when I stop or start the second broker, there is no recconection from
the client
and if I stop the specified broker, there is no connection made by the
client to the second server
otherwise the cluster works as expected
can someone help please?
am I missing something?
Tx Tomer
--
View this message in context: http://activemq.2283324.n4.nabble.com/network-of-broker-update-and-rebalance-not-working-tp4343907p4343907.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Reply:network of broker - update and rebalance not working
Posted by Matt Pavlovich <ma...@gmail.com>.
Hi-
Glad to here the issue has cleared up for you. Using host names is
probably a safer setup in most cases, since there are situations where
using the IP address may cause problems for other folks.
Thanks,
Matt Pavlovich
On 2/1/12 7:19 AM, tomerb wrote:
> figured out the problem (at list on my env)
> when a broker updates another broker that it is up, it identifies itself by
> the server name.
> once the server name of all brokers was added to /etc/hosts on the client
> side, all was well
> :)
> I guess this is bad practice, and the broker should identify itself by ip
> and not by hostname
>
> I was running activeMQ 5.5.1 on ubuntu 10.4
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/network-of-broker-update-and-rebalance-not-working-tp4343907p4347806.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Reply:network of broker - update and rebalance not working
Posted by tomerb <to...@waze.com>.
figured out the problem (at list on my env)
when a broker updates another broker that it is up, it identifies itself by
the server name.
once the server name of all brokers was added to /etc/hosts on the client
side, all was well
:)
I guess this is bad practice, and the broker should identify itself by ip
and not by hostname
I was running activeMQ 5.5.1 on ubuntu 10.4
--
View this message in context: http://activemq.2283324.n4.nabble.com/network-of-broker-update-and-rebalance-not-working-tp4343907p4347806.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Reply:network of broker - update and rebalance not working
Posted by SuoNayi <su...@163.com>.
Seems the same trouble I got into some days ago.
What I want brokers to do is to update clients with urls of brokers of joining or leaving the cluster,
and rebalance clients for us too.
I set up two networked brokers and follow a instruction in a blog(cannot remember the url)
with setting three properties of transport to be true.
The result of test shows this function does not work well and I have raised a jira.
see https://issues.apache.org/jira/browse/AMQ-3544.
At 2012-01-31 17:15:12,tomerb <to...@waze.com> wrote:
>Hi
>I'm having trouble making the *updateClusterClients="true"
>rebalanceClusterClients="true"* work
>I have a network of brokers size 2 with the following brokers configuration
>
>*<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">
>
>
> <bean
>class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> <property name="locations">
> <value>file:${activemq.base}/conf/credentials.properties</value>
> </property>
> </bean>
>
>
> <broker xmlns="http://activemq.apache.org/schema/core"
>brokerName="localhost" dataDirectory="${activemq.base}/data"
>destroyApplicationContextOnStop="true" persistent="false">
>
>
>
>
> <destinationPolicy>
> <policyMap>
> <policyEntries>
> <policyEntry topic=">" producerFlowControl="true"
>memoryLimit="5mb">
> <pendingSubscriberPolicy>
> <vmCursor />
> </pendingSubscriberPolicy>
> </policyEntry>
> <policyEntry queue=">" producerFlowControl="true"
>memoryLimit="50mb">
>
>
> </policyEntry>
> </policyEntries>
> </policyMap>
> </destinationPolicy>
>
>
> <managementContext>
> <managementContext createConnector="false"/>
> </managementContext>
>
> <networkConnectors>
> <networkConnector name="tomer1"
>uri="static:(tcp://tomer-amq-test1:61616)"/>
> </networkConnectors>
>
>
> <persistenceAdapter>
> <memoryPersistenceAdapter/>
> </persistenceAdapter>
>
>
>
>
>
>
> <transportConnectors>
> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"
>updateClusterClients="true" rebalanceClusterClients="true" />
> </transportConnectors>
>
> </broker>
>
>
> <import resource="jetty.xml"/>
>
></beans>*
>
>
>the client is running
>*ant consumer -Dmax=999999 -Durl=failover:\(tcp://tomer-amq-test2:61616\) *
>
>the client always connect only to the specified broker (tomer-amq-test2)
>and when I stop or start the second broker, there is no recconection from
>the client
>and if I stop the specified broker, there is no connection made by the
>client to the second server
>
>otherwise the cluster works as expected
>can someone help please?
>am I missing something?
>
>Tx Tomer
>
>
>--
>View this message in context: http://activemq.2283324.n4.nabble.com/network-of-broker-update-and-rebalance-not-working-tp4343907p4343907.html
>Sent from the ActiveMQ - User mailing list archive at Nabble.com.