activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jay <vaibhav.kap...@razorsight.com>
Subject Re: In a network of brokers, Are the broker names required to be different?
Date Tue, 15 May 2012 15:42:10 GMT
I am using similar set up as described by jessezbj in the earlier post. 
I am having four brokers on the same machine. 
All the brokers have same brokername, but listen on different ports. 
I am not using multi-cast and auto-discovery. 

The problem is, if one of the broker hangs, rest of the brokers also hang.   
I do not get any exception in rest of the brokers or their consumers. 

Following is the activemq.xml that is used: 
[same xml is used for all the brokers by changing the ports] 

<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    
  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">
         <property name="locations">
           
<value>file:///${activemq.base}/conf/credentials.properties</value>
         </property>      
    </bean>
    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="192.168.200.71" dataDirectory="${activemq.base}/data">
        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" memoryLimit="5mb"> 
                     	<messageEvictionStrategy>  
                                <oldestMessageEvictionStrategy/>  
             	 </messageEvictionStrategy>
                    </policyEntry>
                    <policyEntry topic=">" memoryLimit="5mb"> 
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy/>
                        </dispatchPolicy>
                        <subscriptionRecoveryPolicy>
                            <lastImageSubscriptionRecoveryPolicy/>
                        </subscriptionRecoveryPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
        <managementContext>
            <managementContext createConnector="true"/>
        </managementContext>
        <networkConnectors>
            --> 
        </networkConnectors>
        <persistenceAdapter>
            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="20 mb"/>
        </persistenceAdapter>
        <sslContext>
            <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
keyStorePassword="password"
trustStore="file:${activemq.base}/conf/broker.ts"
trustStorePassword="password"/>
        </sslContext>
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="512 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="1 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="100 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>
        <transportConnectors>
            <transportConnector name="openwire"
uri="tcp://192.168.200.71:61619" />
        </transportConnectors>
    </broker>
    <camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
        <package>org.foo.bar</package>
        <route>
            <from uri="activemq:example.A"/>
            <to uri="activemq:example.B"/>
        </route>
    </camelContext>
    <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent" >
        <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFactory">
            <property name="brokerURL"
value="vm://192.168.200.71?create=false&amp;waitForStart=10000" />
            <property name="userName" value="${activemq.username}"/>
            <property name="password" value="${activemq.password}"/>
          </bean>
        </property>
    </bean>
    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
        <connectors>
            <nioConnector port="8164"/>
        </connectors>
        <handlers>
            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
        </handlers>
    </jetty>
</beans>

Any leads to identify the root cause is appreciated. 

Thanks 
J 

--
View this message in context: http://activemq.2283324.n4.nabble.com/In-a-network-of-brokers-Are-the-broker-names-required-to-be-different-tp3337831p4634700.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message