Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3248

Allow for easy externalization of ActiveMQ configuration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.4.2
    • 5.6.0
    • Broker
    • Patch Available

    Description

      Currently many of the AMQ configuration files use the property activemq.base to load in other configuration files, e.g.
      activemq.xml:

      activmeq.xml
      <property name="locations">
        <value>file:${activemq.base}/conf/credentials.properties</value>
      </property>      
      

      jetty.xml:

      jetty.xml
      <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
        <property name="name" value="ActiveMQRealm" />
        <property name="config" value="${activemq.base}/conf/jetty-realm.properties" />
      </bean>
      

      webconsole-embedded.xml:

      webconsole-embedded.xml
      <property name="locations">
        <value>file:${activemq.base}/conf/credentials.properties</value>
      </property>
      

      and others.
      In case where you want to externalize the entire ActiveMQ configuration into a folder that is not a sub folder of AMQ, there is the need to change multiple configuration files. This is error prone.

      In order to make the use of external AMQ configuration more easy to use, I suggest to
      1. Make use of the already existing environment variable ACTIVEMQ_CONFIG_DIR which points to ${ACTIVEMQ_BASE}/conf by default in bin/activemq script.
      2. Map the environment variable to the Java variable activemq.conf in bin/activemq script
      2. Replace all occurences of ${activemq.base}/conf with {$activemq.conf} in all XML configuration files (including those in webapps/ folder)

      That way one can simply point to an external ActiveMQ conf folder by setting the shell environment variable ACTIVE_CONFIG_DIR to that folder. It does not have to be set in the bin/activemq script, it can be set directly on the shell.

      Attachments

        1. AMQ-3248.patch
          13 kB
          Torsten Mielke
        2. AMQ-3248.patch
          31 kB
          Timothy A. Bish
        3. AMQ-3248.patch
          31 kB
          Timothy A. Bish

        Activity

          People

            tabish Timothy A. Bish
            tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified