We have two ActiveMQ(version 5.4.3) instances running and I am using the
shared storage to achieve HA. However I am unable to see failover happening
for the producer and consumer(s).

ActiveMQ broker-1 runs on IP1 and broker-2 on IP2 And under the activemq.xml
of configuration I have modified persistence adapter to use a shared
directory which is present on IP1.

<persistenceAdapter>
  <kahaDB directory="\\IP1\shared-directory\for activemq\data"/>
</persistenceAdapter>


Both in producer and consumer sides I am using following JNDI configurations
to get the connections and build sessions,etc.

jndi.properties

java.naming.factory.initial = ..........ActiveMQInitialContextFactory
java.naming.provider.url =
failover:(tcp://IP1:61616,tcp://IP2:61616)?randomize=false
connectionFactoryNames = myConnectionFactory
queue.requestQ = my.RequestQ


*Interesting part is :
*

When I start this broker pair, I see that one of the brokers becomes master.
When I start the producer, which puts the message on the Q (say producer has
put 100 messages on the Q). While my producer is still running; I shutdown
master broker, hence slave broker acquires the file-lock and becomes
master.When I open the webconsole I see that 100 messages are still there on
the Q. Even though producer is running it no longer puts any messages on
this Q.

Similar to this for the consumers also. Consumer was picking messages from
the Q, this Q has say 100 messages unconsumed when master failed, now master
goes down, slave becomes master, I see 100 messages are still unconsumed,
but the consumer does not pick any message from the Q.

I waited them to failover for a long time.(>10 mins.) Can any one please
suggest what configuration am I missing ?

Thank you.






--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-fail-over-of-producer-and-consumer-with-a-shared-directory-doesn-t-happen-tp4687899.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to