activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mykola <>
Subject Running a HA network of brokers
Date Fri, 31 Aug 2007 13:56:01 GMT

Hi all
After problems with Master/Slave configuration over MySQL when master broker
hangs up after some time, we decided to switch to the Network of Brokers to
achieve HA

I setup 2 brokers on 61616 and 61716 ports with following configs


<!-- Allows us to use system properties as variables in this configuration
file -->

<broker brokerName="localhost" useJmx="false"

	<transportConnector name="openwire" uri="tcp://localhost:61716"/>

	<networkConnector uri="static:(tcp://localhost:61616)"/>



Second one is the same just symmetrical port numbers.

After that I wrote in Connection pool I'm using for both sending and
receiving messages 

	<bean id="jmsConnectionFactory"
		init-method="start" destroy-method="stop" depends-on="jmsBroker">
		<property name="connectionFactory">
				<property name="brokerURL"
					value="${jms.remotehost.uri}" />
				<property name="redeliveryPolicy">
					<bean class="org.apache.activemq.RedeliveryPolicy">
						<property name="backOffMultiplier" value="3"/>
						<property name="useExponentialBackOff" value="true"/>
						<property name="maximumRedeliveries" value="11"></property>
						<property name="initialRedeliveryDelay" value="2000"></property>


As a result, only messages that are sent to one of the queues get consumed,

The question is how can it be fixed the best way.
All I need is HA for message queue, but I'd also like both brokers work
effectively when they are up,
The only solution I see is declare two connection factories, but that is
extensive way since i will need to duplicate a lot of things, is there any
better way?

Thanks in advance for any answers.
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message