5 Replies Latest reply on Nov 6, 2009 9:17 AM by Clebert Suconic

    Second hornetq-configuration.xml ????

    sat mn Newbie

      Hi Can i have hornetq-configuration2.xml like
      "hornetq-configuration.xml " with different queue names , diverts , bridges as that of standard hornetq-configuration.xml

      I want to have different files for different servers for easy maintainence.

      I found the messages are going to queues in mentioned in the hornetq-configuration2.xml but I am not able to see the any messages going over the bridge configured

      any info on this would be great !!!

      Thanks
      Satish

        • 1. Re: Second hornetq-configuration.xml ????
          Clebert Suconic Master

          Look at run.sh. You can specify hornetq-beans.xml, and the directory where the configurations are picked up from.


          on the hornetq-beans, you can change the FileConfiguration to use a different property.

          on the Configuration bean, there is a property called configurationUrl, where you can set a diffferent hornetq-configuration.xml


          Anyway.. the easiest way is to have multiple directories. But you can do it any way you want it.

          • 3. Re: Second hornetq-configuration.xml ????
            Sebastian Gavarini Newbie

            Hi,
            I'd like to add something regarding the file name that happened to me that may help somebody with the same issue. When I changed the default file name "hornetq-configuration.xml", it worked in FileConfiguration and you get many of the options configured, but there is a problem when you also use the tags inside that file instead of the optional hornetq-queue.xml, it won't get deployed. It also happens with the XmlDeployer subclasses, I think it's a little catch, take a look inside QueueDeployer for example:

            public String[] getDefaultConfigFileNames()
             {
             return new String[] { "hornetq-configuration.xml", "hornetq-queues.xml" };
             }


            That method can't be overridden, at least I didn't find an easy way, because the QueueDeployer is instantiated inside a private method of HornetQServerImpl:

            queueDeployer = new QueueDeployer(deploymentManager, messagingServerControl);
            

            and it doesn't know about your hornetq-configuration.xml new chosen name.
            The end result is a:

            Caused by: HornetQException[errorCode=100 message=Binding [your-queue-name] does not exist]

            when you first try to use it as it wasn't loaded as part of the predefined queues.
            Just my two cents, regards,
            Sebastian.

            • 4. Re: Second hornetq-configuration.xml ????
              Sebastian Gavarini Newbie

              Sorry to double post, I pasted an xml tag that wasn't shown in the previous one, now I removed the angle brackets:

              Hi,
              I'd like to add something regarding the file name that happened to me that may help somebody with the same issue. When I changed the default file name "hornetq-configuration.xml", it worked in FileConfiguration and you get many of the options configured, but there is a problem when you also use the queues - queue tags inside that file instead of the optional hornetq-queue.xml, it won't get deployed. It also happens with the XmlDeployer subclasses, I think it's a little catch, take a look inside QueueDeployer for example:

              public String[] getDefaultConfigFileNames()
               {
               return new String[] { "hornetq-configuration.xml", "hornetq-queues.xml" };
               }


              That method can't be overridden, at least I didn't find an easy way, because the QueueDeployer is instantiated inside a private method of HornetQServerImpl:

              queueDeployer = new QueueDeployer(deploymentManager, messagingServerControl);
              

              and it doesn't know about your hornetq-configuration.xml new chosen name.
              The end result is a:

              Caused by: HornetQException[errorCode=100 message=Binding [your-queue-name] does not exist]

              when you first try to use it as it wasn't loaded as part of the predefined queues.
              Just my two cents, regards,
              Sebastian.

              • 5. Re: Second hornetq-configuration.xml ????
                Clebert Suconic Master

                Why don't you just use directories?