After failback HornetQ backup server's connectionfactory reference is not removed from HA-JNDI
Issue
We are trying to implement the dedicated live-backup configuration in HornetQ.
Dedicated live-back is configured with one live and one backup.
We are connecting to the server via HAJNDI port, with the following jnp url: jnp://server1:1100,jnp://server2:1100
-Connection is working fine, until a failover-failback cycle occurs.
-After the failback randomly some connections don't succeed.
-The connection fails at the point when we try to get a Connection from the ConnectionFactory. CF is looked up from HAJNDI with the above url.
After debugging I can see that sometimes the client receives a CF which refers to server2 (which is in backup mode), that's why connection fails.
It seems the backup servers CF is not removed from HAJNDI after failback to live server. So sometimes server2 is assigned from HAJNDI.
That's a bug.
When connecting on JNDI port, than the problem does not arise.
So the solution for two servers would be to use the following url:
jnp://server1:1099,jnp://server2:1099
However in production we want to use more servers as already discussed in previous communication. We want to have one live and three backups.
Is there a way to define a good order of the servers in the url in this scenario if not using HAJNDI?
My problem is that we don't know which one of the backups will take over. And if not the right one is used than the mentioned bug can cause problems for us.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.1.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
