3 Replies Latest reply on Sep 29, 2010 8:57 AM by balrajk

    Auto discovery of HornetQ server by Client

    balrajk

      Hello,

       

      I am trying to configure the client to do a auto-discovery of the HornetQ 2.1.1 server in the JBoss 5.1 instance.

      I have two instances of JBoss with HornetQ running on different machines.

      On first instance i have the Queue defined and in the second instance I have an MDB listening on the queue.

      I configured the discovery-group-ref type  in the hornetq-jms.xml file.

      <discovery-group-ref discovery-group-name="my-discovery-group"/>

       

      From a java stand-alone client I drop messages to the queue via JNDI lookup. But these messages are not retrieved by the MDB.

       

      Am I going wrong with the configuration?

       

      The configuration files used are attached herewith.

       

      Please suggest..

        • 1. Re: Auto discovery of HornetQ server by Client
          balrajk

          ra.xml file needs to configured along with the other configurations mentioned in the documentation.

          multicast details need to be mentioned in this file.

           

          <config-property>
                  <description>The discovery group address</description>

                 <!-- This property needs to be updated. since this method is not available in code -->
                  <!--<config-property-name>DiscoveryGroupAddress</config-property-name>-->
                  <config-property-name>DiscoveryAddress</config-property-name>
                  <config-property-type>java.lang.String</config-property-type>
                  <config-property-value>Multicast Address</config-property-value>
                </config-property>
                <config-property>
                  <description>The discovery group port</description>

                    <!-- This property needs to be updated. since this method is not available in code -->
                      <!--<config-property-name>DiscoveryGroupPort</config-property-name>-->
                  <config-property-name>DiscoveryPort</config-property-name>
                  <config-property-type>java.lang.Integer</config-property-type>
                  <config-property-value>9876</config-property-value>
                </config-property>
                <config-property>
                  <description>The discovery refresh timeout</description>
                  <config-property-name>DiscoveryRefreshTimeout</config-property-name>
                  <config-property-type>java.lang.Long</config-property-type>
                  <config-property-value>2000</config-property-value>
                </config-property>

           

          ra.xml is available in the hornetq-ra.rar/meta-inf folder

          • 2. Re: Auto discovery of HornetQ server by Client
            timfox
            1 of 1 people found this helpful
            • 3. Re: Auto discovery of HornetQ server by Client
              balrajk

              Thanks Tim,

              Actually the documentation doesn't specify about mentioning the multicast address for auto-discovery.