4 Replies Latest reply on Jul 31, 2012 5:41 PM by hdcosta

    Disabling the embedded ActiveMQ broker

    hdcosta

      What's the best way to disable the default embedded ActiveMQ broker, so that an external broker can be used.

       

      I tried disabling the activemq feature. That definitely stops starting up the internal broker, but then routing connections to an external broker also fail.

        • 1. Re: Disabling the embedded ActiveMQ broker
          garytully

          Have a read of http://fusesource.com/docs/esbent/7.0/amq_admin/FMQAdminConfigSolo.html

           

          The standalone broker in ESB Enterprise is configured via osgi config admin. The config file is etc/org.fusesource.mq.fabric.server-default.cfg

           

          The simplest way to disable it is to move the .cfg file so that it does not match the config admin service factory. The message broker service factory uses the prefix: org.fusesource.mq.fabric

          so if you simply:

          mv etc/org.fusesource.mq.fabric.server-default.cfg etc/disabled-org.fusesource.mq.fabric.server-default.cfg

           

          the embedded broker will be shutdown. What you are doing is essentially hiding the configuration details of the default broker instance.

           

          You could remove that file altogether if you like.

          • 2. Re: Disabling the embedded ActiveMQ broker
            hdcosta

            Thanks for the suggestion. I had to remove the file from etc and also remove the registered configuration using the osgi admin service for it to work.

             

            Edited by: hdcosta on Jul 31, 2012 9:34 PM

            • 3. Re: Disabling the embedded ActiveMQ broker
              garytully

              The mv/rename needs to be done while FUSE ESB is active, so that config admin can react to the removal.

               

              If you remove it while the ESB is inactive, you need to clear out the cached copy in the data directory, otherwise it will attempt to recreate from the cached config, causing the default broker to again be restarted.

              • 4. Re: Disabling the embedded ActiveMQ broker
                hdcosta

                Yes. I realized it. Thanks for your help.

                 

                By the way, renaming a cfg file doesn't work. Apparently the admin service still loads the configuration under a new pid.

                 

                Edited by: hdcosta on Jul 31, 2012 9:40 PM