I am trying to setup a HA environment consisting of two severs. The data folder including the journal are shared between the server via an NFS share. The directory /mnt/share is common to both systems. After some fiddling the configuration I managed to get fail over working (I think).
When I stop server1 using CTRL+C the other (server1_standby) seems to take over and become the live server.
My test client sends a series of simple text messages to a queue hosted on the server. It uses JNDI and JMS api rather then HornetQ specific code. It does a standard JNDI lookup and retrieves the SpecialConnectionFactory configured as shown below / attached.
The problem which occurs is that the client (attached) keeps logging the following message
Exception Session is closed during sending
rather then falling over to the backup server. My question is should I expect it to continue. I don't mind it getting some exception while failover takes place, but I am hoping to be able to avoid having to re-connect to the backup server manually. The examples included seem to suggest this is possible even though they focus on message acknowledgment rather then sending.
Any pointers what do try out to get HA with failover working correctly ?
Also if I restart the stopped server the client doesn't seem to resume sending messages ? Any pointer to get this working ? Using the supplied examples I managed to get this working. I tried to compare the server configuration, but haven't been able to find the relevant difference.
I am using hornetq-2.2.5.Final on Linux with Java 1.7.0_01 64 bit
Thanks in advance
Here are extracts from my configuration. The complete files are attached to the discussion.
<!-- Pause 1 second between connect attempts -->
<!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
pause is the same length -->
<!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
My hornet configuration file (hornetq-configuration.xml) contains the following details