Hi, I have issues running a master/slave configuration (brokers configuration attached). Here is what I do : - Start master - Start slave - Shutdown slave - Restart slave
=> Messages are not transmitted anymore. => Master displays : javax.jms.JMSException: The destination topic://ActiveMQ.Advisory.Connection does not exist. at org.apache.activemq.broker.region.AbstractRegion.lookup(AbstractRegion.java:395) at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:341) at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:445) at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224) at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:325) at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:268) at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:260) at org.apache.activemq.advisory.AdvisoryBroker.addConnection(AdvisoryBroker.java:78) at org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:81) at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:88) at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:662) at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:125) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180) at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143) at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183) at java.lang.Thread.run(Thread.java:595) I don't get what's going wrong. Can someone help me on this ? Thanks Nicolas PS : On master shutdown, using failover urls, messages are routed to the slave and dispatched properly
<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"> <!-- Allows us to use system properties as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="master" dataDirectory="${activemq.base}/data" useJmx="false"> <destinations> <topic name="MyTopic" physicalName="MyTopic" /> </destinations> <managementContext> <managementContext createConnector="false"/> </managementContext> <persistenceAdapter> <amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb"/> </persistenceAdapter> <!-- The transport connectors ActiveMQ will listen to --> <transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61616" /> </transportConnectors> </broker> <jetty xmlns="http://mortbay.com/schemas/jetty/1.0"> <connectors> <nioConnector port="8161"/> </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>
<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"> <!-- Allows us to use system properties as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> <broker xmlns="http://activemq.apache.org/schema/core" brokerName="slave" dataDirectory="${activemq.base}/data-slave" masterConnectorURI="tcp://localhost:61616" shutdownOnMasterFailure="false" useJmx="false"> <destinations> <topic name="MyTopic" physicalName="MyTopic" /> </destinations> <managementContext> <managementContext createConnector="false"/> </managementContext> <persistenceAdapter> <amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data-slave" maxFileLength="20 mb"/> </persistenceAdapter> <!-- The transport connectors ActiveMQ will listen to --> <transportConnectors> <transportConnector name="openwire" uri="tcp://localhost:61617"/> </transportConnectors> </broker> </beans>