Hi everyone I'm trying to understand ApacheMQ to achieve a message HA system. I think that Shared Master Slave is one of the architecture options to me , but, unfortunely, I am cannot get the proper configuration . let me explain the scenario of my tests : - I want to test HA - that means , if the master goes down, I want slave became the master and such "slave-master" must continue to broke message as master was doing; - I want (or must) be able to get the messages after slave becomes master ; that means messages must be saved in the slave . The architecture should be able to save the messages while slave became master; - the producer and consumer apps should not notice the issue when master goes down and slave became master.
To achieve such points, I read documentation and tried to understand .. Also , I checked other sites (for instance http://note19.com/2007/06/24/activemq-masterslave-setup/ Then ,I set the configuration file , inside broker tag <networkConnectors> <networkConnector name="queue" uri="static://(tcp://sim1648:61616,tcp://sim1660:61616)" /> </networkConnectors> wheres sim1648 and sim1660 are the computer names for master and slave. Also, the producer and consumer test applications, I used failover:(tcp://sim1648:61616,tcp://sim1660:61616) as a parameter in the code : ConnectionFactory factory = new ActiveMQConnectionFactory(failover:(tcp://sim1648:61616,tcp://sim1660:61616) sim1648 is the master; sim1660 is the slave. I start Master ActiveMQ , start Slave ActiveMQ ; then start consumer and producer test apps . I am able to get the message in the consumer sent by the producer Then, manually I shutdown Master Broker . In the console of consumer test app, I got : 75117 [ActiveMQ Transport: tcp://sim1648/127.0.1.1:61616] WARN org.apache.activemq.transport.failover.FailoverTransport - Transport (sim1648/127.0.1.1:61616) failed to tcp://sim1648:61616 , attempting to automatically reconnect due to: java.io.EOFException. and consumer app finishs. THe other point is : if I restart consumer, I am able to get the messages send by producer, BUT, I notice that some of them were lost , I mean, consumer does not recover or is not able to get the messages sent by producer while consumer was down . I guess the issue is a mix of misconfiguration and wrong code in the consumer , but I am not able to realize what is wrong . The summary are : - how can I configure to have proper a HA Master Slave ? - What should I do to have a consumer able to read (get) messages while it is down? Sorry by the big post, Thanks in advance, -- View this message in context: http://activemq.2283324.n4.nabble.com/Configuration-Shared-Master-Slave-and-some-questions-tp4301080p4301080.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.