Something else that I had working in a broadcast discovery environment that I can't seem to get working now in a static cluster environment is HA failover.
My hornetq-configuration.xml defines the cluster like so. The netty connector is the primary and netty-backup is the backup. (I've also tried it with just netty-backup.) When I bring them both up I see the backup announcement and when I kill the primary the backup takes over.
<!-- Clustering configuration -->
I've defined my connection factory in hornetq-jms.xml like so:
I've tried it both with and without confirmation-window-size (which the docs say are required but isn't set in the sample) but that doesn't seem to help. With reconenct-attempts set to 10 I'll eventually get
org.hornetq.core.logging.impl.JULLogDelegate warn WARNING: Tried 10 times to connect. Now giving up on reconnecting it.
But if I set it to -1 then my producer just hangs continuously attempting to reconnect to the dead server. Did I miss something in the config?
This is why you don't do things when you're tired. Remember when you told me that the ports would bite me in the ass on that other thread, Clebert. Well, it did. Somewhere in my copying and pasting the acceptor on the backup got the wrong port. *sigh* That and setting the right config on the backup instead of the live server did the trick.