Hi, My previous message didn't get any feedback. Today, I tried several other settings and seem to get good results with durable=true (sets delivery mode to persistent). However it seems that in some cases I get duplicate messages. I'll investigate more... Any help from people that tested a similar setup (it must be quite common) would be appreciated. Thanks in advance, Bernard.
Bernard Niset wrote: > > Hi, > I am testing JDBC Master/Slave failover as described here: > http://www.activemq.org/site/jdbc-master-slave.html. > > The setup works but I noticed there can be lost messages during the > failover. > > My setup is the following: > * ActiveMQ 4.1.0 (linux distribution), ran wih the wrapper. > * Postgresql 8.1.5 > * 2 machines are configured with activemq and point to the same database. > > I use the ConsumerTool and the ProducerTool provided in the example > directory. > > Here is the way they are launched: > Producer: ant -Dmax=6000 -DsleepTime=50 -Dtopic=false > -Dsubject=org.apache.activemq.spring.Test.spring > "-Durl=failover:(tcp://localhost:61616,tcp://xeon:61616)" producer > > > > Output on the producer: > .. many lines > [java] Sending message: Message: 540 sent at: Thu Jan 25 15:41:08 CET > 2007... > [java] Sending message: Message: 541 sent at: Thu Jan 25 15:41:08 CET > 2007... > [java] 15:41:08 INFO Transport failed, attempting to automatically > reconnect due to: java.io.EOFException > [java] java.io.EOFException > [java] at > java.io.DataInputStream.readInt(DataInputStream.java:375) > [java] at > org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267) > [java] at > org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156) > [java] at > org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136) > [java] at java.lang.Thread.run(Thread.java:619) > [java] Sending message: Message: 542 sent at: Thu Jan 25 15:41:08 CET > 2007... > ... many lines > > Output on the consumer > ... many lines > [java] Received: Message: 538 sent at: Thu Jan 25 15:41:08 CET > 2007... > [java] Received: Message: 539 sent at: Thu Jan 25 15:41:08 CET > 2007... > [java] Received: Message: 540 sent at: Thu Jan 25 15:41:08 CET > 2007... > [java] 15:41:08 INFO Transport failed, attempting to automatically > reconnect due to: java.io.EOFException > [java] java.io.EOFException > [java] at > java.io.DataInputStream.readInt(DataInputStream.java:375) > [java] at > org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:267) > [java] at > org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:156) > [java] at > org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136) > [java] at java.lang.Thread.run(Thread.java:619) > [java] Received: Message: 542 sent at: Thu Jan 25 15:41:08 CET > 2007... > [java] Received: Message: 543 sent at: Thu Jan 25 15:41:08 CET > 2007... > ... many lines > > It is clear from this output that message 541 is not seen by the consumer, > although it is sent (or should be) by the producer. > > Thanks for any help on this. > Bernard. > > > -- View this message in context: http://www.nabble.com/Message-lost-during-failover-tf3112451.html#a8748067 Sent from the ActiveMQ - User mailing list archive at Nabble.com.