I am currently setting up a HornetQ cluster. To my understanding, HornetQ cluster and HA are two different concepts. However, I want to ask a few questions:
For the current non-cluster model,
1. HornetQ 2.1.2 Final standalone server and JBoss 4.2.3GA are used.
2. We are using the JCA adapter (hornetq-ra.rar) to consume the messages with MDB.
3. We also deployed a data source (hornetq-ds.xml) for sending messages.
And as mentioned before, we are going to set up a cluster to achieve certain level of "high-availability".
I read the HA part in the documentation. As shared store is not an option for us, I would like to go for replication. However, I find that it is removed form the documentation in the later versions.
a. Does data replication HA-mode in 2.1.2 Final work?
Then I read the cluster part and tried different combination of version and configuration. I still cannot achieve what I want. I am using discovery mode for the cluster.
I set a cluster with two HornetQ nodes.
b. With 2.1.2 Final, all the consumers are connected to the same node but with 2.2.5 Final the consumers can be load balanced to two different nodes. Are there any special configurations for 2.1.2 to achieve this?
c. When I set reconnectAttempts to -1 and shutdown one node, the consumer cannot fail over to another node. They keep reconnecting to the original node. Is it expected behavior?
d. If the above is expected behavior, are there any methods for me to setup the "Cluster Failover"?
e. For the sender, it also keeps trying to send message to the failed node. Are methods to re-initiate the connection?
f. As I am using JBoss4, I don't have a success in setup a server with version > 2.2.5 Final. Do anyone have experience in setting the JCA adapter in JBoss4?
I also heard that using the JBoss HA-JNDI may achieve "Cluster Failover". So I tried to setup a JBoss7 Cluster (Yes. I found that JBoss 7 do not have HA-JNDI after setting it.......)
g. Do anyone have some successful cases of that? I will go for it if so.
To make it simple, I want to have the followings:
1. Setting up a cluster with two node.
2. the MDBs and senders can connect to the other node automatically if one node fails.
And finally, my boss gave me some restrictions:
1. It is impossible to upgrade JBoss.
2. It is BETTER not to upgrade HornetQ (But I think we may upgrade it if necessary)