Hello,

I am struggling to get my client to failover as I'd expect in my cluster.

I am expecting that when 1 node fails my client should jump to that node's 
backup in the topology. However, what I see occur is my client jumps to another 
primary node instead. Sometimes I do see things behave as expected but it seems 
to depend on where my consumers get initially created.

For example, if I have consumer A end up on broker A, and consumer B end up on 
broker B, then when I close broker A consumer A will just jump over to broker B 
instead of jumping over to its replicated backup. Then if I close broker B 
after restarting broker A the consumer that had previously jumped to broker B 
will jump back to broker A while the other consumer properly goes into the back 
up for broker B.

I am currently using Spring and running a JMS implementation.

I'm not sure if it will change anything or be of importance but I am using a 
replicated setup for HA where I have all 6 nodes just running locally with 
ports offset. The end goal will be 3 servers but for now this is just so I can 
test things out.
I've also read these docs on client 
failover<https://activemq.apache.org/components/artemis/documentation/latest/client-failover.html#reconnect-to-the-backup-server>
 which makes me think all I should have to do is add 'HA' and 
'reconnectAttempts' to my connection factory URL, however this has proved 
fruitless.

I have an open stack overflow question for this problem as well which may help 
provide more detail.
https://stackoverflow.com/questions/79452615/client-failover-not-failing-to-backup-broker-first

Here is some additional info:
I have confirmed that replication is working and in my primary broker logs I 
see AMQ221025: Replication: sending NIOSequentialFile when I boot up my backups 
(As well as the AMQ221031: backup announced on my backup).
Viewing my network topology also shows me what I would expect to see (3 
primaries paired with 3 backups).
I have tried entirely removing my CachedConnectionFactory.
I have tried deleting and remaking each of my brokers just in case. (This 
seemed to work for a brief period).

Any help is appreciated,
Sergio Scaramuzzi





The foregoing message, together with any attachments is intended for the 
addressee only.  If you believe you received this message in error, please 
delete all copies of this message.  If you no longer wish to receive electronic 
messages, please reply to this message with the word "UNSUBSCRIBE" in the 
subject line and you will be removed from our mailing lists.  Thank you.

Reply via email to