1 Reply Latest reply on May 26, 2010 3:37 AM by Andy Taylor

    Client side load balancing and failover

    Veeru M Newbie

      Question regarding the client side load balancing by specifying list of servers using JMS: In the case of failure of one of the HQ server instances, the client shouldn't be failing over to remaining active server(s)?

       

      We have the below Environment / configuration:

       

      1. Two standalone, non-clustered HQ instances running on 2 different Linux nodes (host1, host2).

      2. The connector configuration in hornetq-configuration.xml on host1

            <connector name="netty">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
               <param key="host"  value="${hornetq.remoting.netty.host:host1}"/>
               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
            </connector>

            <connector name="remoteNettyOnHost2">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
               <param key="host"  value="${hornetq.remoting.netty.host:host2}"/>
               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
            </connector>

       

      3. The connection factory configuration in hornetq-jms.xml on host1

              <connection-factory name="ClusteredConnectionFactory">
                 <connectors>
                      <connector-ref connector-name="netty"/>
                      <connector-ref connector-name="remoteNettyOnHost2"/>
                 </connectors>
                      <entries>
                              <entry name="/ClusteredConnectionFactory"/>
                              <entry name="/XAConnectionFactory"/>
                      </entries>
              </connection-factory>

       

      4. The standlone client (attached).

       

      The above configuration load balances the messages to 2 HQ instances without any issue. But when the host 2 is stopped, the client is able to send only half of the messages to host1. Host2 calls are failing (error messages are in attached sop.txt).

       

      Our question is when the host2 is stopped, shouldn't it failover to host1? Please clarify.