1 Reply Latest reply on Mar 4, 2012 10:13 PM by gaohoward

    Cluster isolation

    hcura

      Hi there!

       

      We are using HornetQ 2.1.2 with JBoss 5.1.0 on 2 two different clustered environments - development and test. Since there's no network isolation between the two we're having some trouble making them completely isolated from each other using hornetq configuration.

       

      In each scenario we have at least two servers that form a cluster. The problem is that some messages go to the wrong cluster, eg: they are meant to test but end up in the development one. By simple shutting down the development servers the problem stops happening, obviously.

       

      Here's a snippet of our configuration files from each environment.

       

      Test environment configuration  (jboss/deploy/hornetq.sar/hornetq-configuration.xml)

       

      <broadcast-groups>
            <broadcast-group name="my-bg">
               <group-address>231.8.8.8</group-address>
               <group-port>9880</group-port>
               <broadcast-period>5000</broadcast-period>
               <connector-ref connector-name="netty"/>
            </broadcast-group>
      </broadcast-groups>
      
      <discovery-groups>
            <discovery-group name="my-dg">
               <group-address>231.8.8.8</group-address>
               <group-port>9880</group-port>
               <refresh-timeout>10000</refresh-timeout>
            </discovery-group>
      </discovery-groups>
      
      <cluster-connections>
            <cluster-connection name="my-cluster">
               <address>jms</address>
               <use-duplicate-detection>true</use-duplicate-detection>
               <forward-when-no-consumers>true</forward-when-no-consumers>
               <max-hops>1</max-hops>
               <discovery-group-ref discovery-group-name="my-dg"/>
            </cluster-connection>
      </cluster-connections>
      

       

      Development environment configuration  (jboss/deploy/hornetq.sar/hornetq-configuration.xml)

       

       

      <broadcast-groups>
            <broadcast-group name="my-bg">
               <group-address>231.8.9.9</group-address>
               <group-port>9890</group-port>
               <broadcast-period>5000</broadcast-period>
               <connector-ref connector-name="netty"/>
            </broadcast-group>
         </broadcast-groups>
      
      <discovery-groups>
            <discovery-group name="my-dg">
               <group-address>231.8.9.9</group-address>
               <group-port>9890</group-port>
               <refresh-timeout>10000</refresh-timeout>
            </discovery-group>
      </discovery-groups>
      
      <cluster-connections>
            <cluster-connection name="my-cluster">
               <address>jms</address>
               <use-duplicate-detection>true</use-duplicate-detection>
               <forward-when-no-consumers>true</forward-when-no-consumers>
               <max-hops>1</max-hops>
               <discovery-group-ref discovery-group-name="my-dg"/>
            </cluster-connection>
      </cluster-connections>
      

       

      The rest of the configuration is pretty standard from the one provided with hornetq.

       

      My question is here is what is wrong with this configuration? We're using different multicast addresses to create both the discovery and broadcast groups and it doesen't work. Also the JBoss configuration is using the same strategy with no problems.

       

      Regards,

      Hugo