6 Replies Latest reply: Dec 6, 2011 2:30 PM by Alex Corvino RSS

    Failover with static clusters?

    Alex Corvino Newbie

      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 -->


            <cluster-connection name="my-cluster">













      I've defined my connection factory in hornetq-jms.xml like so:


         <connection-factory name="NettyConnectionFactory">


               <connector-ref connector-name="netty"/>



               <entry name="/ConnectionFactory"/>












      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?