activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Slow Failover
Date Thu, 02 May 2013 12:57:09 GMT
on your clients, enable trace level logging for :
org.apache.activemq.transport.failover.FailoverTransport

that will help you see what is going on under the hood till the
reconnect occurs.

There could be some dns/ip matching issues between the client and the brokers.
post the logging output if you need some more input.

there were a few fixes in this area in the past weeks on trunk so it
may be something that has been resolved or there is a workaround for.

On 29 April 2013 17:31, thomas.r.parkinson <thomas.r.parkinson@gmail.com> wrote:
> Hello Ladies and Gentlemen,
>
> Having a problem using the failover protocol to connect to another broker
> when the connection to the current broker dies. The client is taking a long
> time about  1min and 15 seconds to failover to another known broker. Is
> there are configuration options i can use to improve this such that clients
> failover faster?
>
> I've tried using the backup=true on client connection but that makes no
> difference!
>
> Using activeMq 5.8 three brokers using static network protocol all three
> brokers create duplex connection to each other.
>
> Were using update configuration properties:
> updateClusterClients="true"
> rebalanceClusterClients="true"
> updateClusterClientsOnRemove="true"
>
> So we can scale and rebalance the cluster at will depending on demand.
>
> Clients are connecting with configuration uri:
> failover:(tcp://" + brokerIp +
> ":61616)?useExponentialBackOff=false&updateURIsSupported=true
>
> Sample config from one brokers:
> <beans
>   xmlns="http://www.springframework.org/schema/beans"
>   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.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.conf}/credentials.properties</value>
>         </property>
>     </bean>
>
>     <broker xmlns="http://activemq.apache.org/schema/core"
>         useJmx="true"
>         brokerName="amq-node-1"
>         dataDirectory="${activemq.data}"
>         networkConnectorStartAsync="true">
>
>         <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                 <policyEntry topic=">" producerFlowControl="true">
>                     <pendingMessageLimitStrategy>
>                         <constantPendingMessageLimitStrategy
> limit="100000"/>
>                     </pendingMessageLimitStrategy>
>                 </policyEntry>
>                 <policyEntry queue=">" producerFlowControl="true"
> queuePrefetch="1">
>                     <pendingMessageLimitStrategy>
>                         <constantPendingMessageLimitStrategy
> limit="100000"/>
>                     </pendingMessageLimitStrategy>
>                 </policyEntry>
>               </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
>
>         <managementContext>
>             <managementContext createConnector="true"/>
>         </managementContext>
>
>
>         <persistenceAdapter>
>             <kahaDB
>             directory="${activemq.data}/kahadb"
>             indexCacheSize="131072"/>
>         </persistenceAdapter>
>
>           <systemUsage>
>             <systemUsage>
>                 <memoryUsage>
>                     <memoryUsage limit="2 gb"/>
>                 </memoryUsage>
>                 <storeUsage>
>                     <storeUsage limit="50 gb"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="20 gb"/>
>                 </tempUsage>
>             </systemUsage>
>         </systemUsage>
>
>         <networkConnectors>
>                 <networkConnector name="amq-node-1-amq-node-3-queuesOnly"
>
> uri="static:(tcp://172.27.1.137:61616?connectionTimeout=5000)?maxReconnectDelay=5000"
>                     networkTTL="1"
>                     conduitSubscriptions="false"
>                     duplex="true">
>                     <dynamicallyIncludedDestinations>
>                         <queue physicalName=">"/>
>                     </dynamicallyIncludedDestinations>
>                 </networkConnector>
>                 <networkConnector name="amq-node-1-amq-node-3-topicsOnly"
>
> uri="static:(tcp://172.27.1.137:61616?connectionTimeout=5000)?maxReconnectDelay=5000"
>                     networkTTL="1"
>                     suppressDuplicateQueueSubscriptions="true"
>                     duplex="true">
>                     <dynamicallyIncludedDestinations>
>                         <topic physicalName=">"/>
>                     </dynamicallyIncludedDestinations>
>                 </networkConnector>
>                 <networkConnector name="amq-node-1-amq-node-2-queuesOnly"
>
> uri="static:(tcp://172.27.1.113:61616?connectionTimeout=5000)?maxReconnectDelay=5000"
>                     networkTTL="1"
>                     conduitSubscriptions="false"
>                     duplex="true">
>                     <dynamicallyIncludedDestinations>
>                         <queue physicalName=">"/>
>                     </dynamicallyIncludedDestinations>
>                 </networkConnector>
>                 <networkConnector name="amq-node-1-amq-node-2-topicsOnly"
>
> uri="static:(tcp://172.27.1.113:61616?connectionTimeout=5000)?maxReconnectDelay=5000"
>                     networkTTL="1"
>                     suppressDuplicateQueueSubscriptions="true"
>                     duplex="true">
>                     <dynamicallyIncludedDestinations>
>                         <topic physicalName=">"/>
>                     </dynamicallyIncludedDestinations>
>                 </networkConnector>
>         </networkConnectors>
>
>
>         <transportConnectors>
>
>             <transportConnector name="openwire"
> uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"
>                 updateClusterClients="true"
>                 rebalanceClusterClients="true"
>                 updateClusterClientsOnRemove="true"
>             />
>             <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
>         </transportConnectors>
>
>
>         <shutdownHooks>
>             <bean xmlns="http://www.springframework.org/schema/beans"
> class="org.apache.activemq.hooks.SpringContextHook" />
>         </shutdownHooks>
>
>
>         <plugins>
>             <statisticsBrokerPlugin/>
>         </plugins>
>
>     </broker>
>
>
>     <import resource="jetty.xml"/>
>
> </beans>
>
> Any help would be greatly appreciated.
>
> Thank you
>
> Tom Parkinson
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Slow-Failover-tp4666393.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com

Mime
View raw message