2 Replies Latest reply on Jul 10, 2014 6:18 PM by Philip Tenn

    DiscoveryGroupConfiguration changes from HornetQ 2.2 to HornetQ 2.4

    Philip Tenn Newbie

      Hi All,


      I am attempting to write JMS Client code (runs inside a WAR in a JBoss EAP 6.2 server instance) that sends messages to a HornetQ Cluster.  The HornetQ Cluster uses multicast UDP.


      I tried to migrate some code from HornetQ 2.2 to HornetQ 2.4 client and ran into problems/confusion.


      Here is my code for creating a ConnectionFactory using HornetQ 2.2 Client:



                  DiscoveryGroupConfiguration discoveryGroup = new DiscoveryGroupConfiguration("", 9876);
                  HornetQConnectionFactory connectionFactory =
                     HornetQJMSClient.createConnectionFactoryWithHA(discoveryGroup, JMSFactoryType.CF);


      I tried to migrate to a HornetQ 2.4 Client, but appears that the entire DiscoveryGroupConfiguration class has changed.


      I went through the JavaDocs: HornetQ Core Client 2.4.0.Final API for DiscoveryGroupConfiguration, BroadcastEndpointFactoryConfiguration, DiscoveryGroupConfigurationCompatibilityHelper.  I can see that these all interact.


      However, I could not figure out how (using HornetQ 2.4 Client API) to do the equivalent of the code snippet I have in HornetQ 2.2. It looked like the API for 2.4 was much more complex and required information (like local bind address/port) that I do not have.


      Has anyone done this before?  I would really appreciate any help or advice.


      Thank you very much!


      - Philip