3 Replies Latest reply on Aug 23, 2011 3:32 PM by ameyamk

    Static Cluster Discovery issues

    ameyamk

      Hi,

       

      I am trying to setup HornetQ cluster in static discovery mode.

       

      Here is overall setup:

       

      2 servers:

       

      hornetq1.ec

      hornetq2.ec

       

      I'd like these 2 servers to be in cluster mode. My configurations are as follows:

       

      On server 1:

       

      <clustered>true</clustered>

       

      <connector name="hornetq2.ec">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                 <param key="host" value="hornetq2.ec" />

                 <param key="port" value="5445" />

      </connector>

       

      AND

       

      <cluster-connections>

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

               <address>jms</address>

               <connector-ref>netty-connector</connector-ref>

               <retry-interval>500</retry-interval>

               <use-duplicate-detection>true</use-duplicate-detection>

               <forward-when-no-consumers>true</forward-when-no-consumers>

               <max-hops>1</max-hops>

               <static-connectors>

                  <connector-ref>hornetq2.ec</connector-ref>

               </static-connectors>

            </cluster-connection>

         </cluster-connections>

       

       

      Similar configs on server2

       

      I have consumers connected to both the servers.

       

      I am sending 100+ messages to hornetq1.ec and I was expecting load balanced output to both the consumers. However only consumer connected to hornetq1.ec receiving all the messages.

       

      Am I missing something?

        • 1. Re: Static Cluster Discovery issues
          ameyamk

          More info:

           

          I can see in the server logs that it does enter into cluster mode. But I do not see messages getting load balanced.

          Here is what I see in logs:

           

          Connecting bridge sf.my-cluster.fa30c043-cce9-11e0-a12b-005056950805 to its destination [faec5bcc-a1f8-11e0-b18f-005056954fd7]

          [Thread-7 (group:HornetQ-server-threads120708763-1136341612)] 08:11:02,428 INFO [org.hornetq.core.server.cluster.impl.BridgeImpl]  Bridge sf.my-cluster.fa30c043-cce9-11e0-a12b-005056950805 is connected [faec5bcc-a1f8-11e0-b18f-005056954fd7-> sf.my-cluster.fa30c043-cce9-11e0-a12b-005056950805]

           

          Am I missing something?

          • 2. Re: Static Cluster Discovery issues
            ataylor

            do both nodes have bridges created correctly, also check the consumer count on the queues

            • 3. Re: Static Cluster Discovery issues
              ameyamk

              Yes. Both servers show 1 consumer each