ActiveMQ
  1. ActiveMQ
  2. AMQ-4682

runtime configuration - allow selective application of changes to xml configuration without broker restart

    Details

      Description

      support on the fly configuration changes where appropriate.
      Via JMX it is possible to make changes but they don't persist.
      Via osgi we can restart the broker to pick up changes to xml config
      but where it makes sense, we should be able to apply changes on the fly.

      A first example would be the addition on a new network connector by
      the addition of the relevant xml config (edit or copy over) that is
      in use by the broker.

        Issue Links

          Activity

          Gary Tully created issue -
          Hide
          Gary Tully added a comment -

          support for mods/updates to networkconnctors is complete, with an xml config like:

          <broker xmlns="http://activemq.apache.org/schema/core" start="false" ... >
              <plugins>
                <runtimeConfigurationPlugin checkPeriod="1000" />
              </plugins>
          
              <networkConnectors>
                <networkConnector uri="static:(tcp://localhost:5555)" networkTTL="1" name="one" .../>
              </networkConnectors>
              ...

          Any modification to the networkConnectors element will be picked up within a second (checkPeriod).

          Show
          Gary Tully added a comment - support for mods/updates to networkconnctors is complete, with an xml config like: <broker xmlns= "http: //activemq.apache.org/schema/core" start= " false " ... > <plugins> <runtimeConfigurationPlugin checkPeriod= "1000" /> </plugins> <networkConnectors> <networkConnector uri= " static :(tcp: //localhost:5555)" networkTTL= "1" name= "one" .../> </networkConnectors> ... Any modification to the networkConnectors element will be picked up within a second (checkPeriod).
          Hide
          Gary Tully added a comment - - edited

          modification to destinationInterceptors add, modify, remove now implemented. Changes are effective on the next destination add (new consumer) which gates concurrent access.

          <destinationInterceptors>
                <virtualDestinationInterceptor>
                  <virtualDestinations>
                    <virtualTopic name="B.>" selectorAware="false"/>
                  </virtualDestinations>
                </virtualDestinationInterceptor>
              </destinationInterceptors>

          virtualDestinationInterceptor are a little odd b/c virtualTopics are enabled by default w/o any explicit config. On an initial add, the existing default interceptor, if present, is modified.

          Show
          Gary Tully added a comment - - edited modification to destinationInterceptors add, modify, remove now implemented. Changes are effective on the next destination add (new consumer) which gates concurrent access. <destinationInterceptors> <virtualDestinationInterceptor> <virtualDestinations> <virtualTopic name= "B.>" selectorAware= " false " /> </virtualDestinations> </virtualDestinationInterceptor> </destinationInterceptors> virtualDestinationInterceptor are a little odd b/c virtualTopics are enabled by default w/o any explicit config. On an initial add, the existing default interceptor, if present, is modified.
          Hide
          Gary Tully added a comment -

          if <runtimeConfigurationPlugin checkPeriod="0" /> (the default value), an update can be forced via JMX. The updateNow operation on the service=RuntimeConfiguration,name=Plugin Mbean will force the application of any changes to the xml configuration.

          Show
          Gary Tully added a comment - if <runtimeConfigurationPlugin checkPeriod ="0" /> (the default value), an update can be forced via JMX. The updateNow operation on the service=RuntimeConfiguration,name=Plugin Mbean will force the application of any changes to the xml configuration.
          Hide
          Gary Tully added a comment -

          support modification to authorizationPlugin map - add/remove/mod authorizationEntry

          <plugins>
            <runtimeConfigurationPlugin checkPeriod="1000"/> 
            <authorizationPlugin>
              <map>
                <authorizationMap>
                  <authorizationEntries>
                    <authorizationEntry queue=">" read="admins" write="admins" admin="admins"/>
                    ...
          Show
          Gary Tully added a comment - support modification to authorizationPlugin map - add/remove/mod authorizationEntry <plugins> <runtimeConfigurationPlugin checkPeriod= "1000" /> <authorizationPlugin> <map> <authorizationMap> <authorizationEntries> <authorizationEntry queue= ">" read= "admins" write= "admins" admin= "admins" /> ...
          Hide
          Gary Tully added a comment -

          support for modifications to primitive attributes of destinationPolicy

          <destinationPolicy>
                <policyMap>
                  <policyEntries>
                    <policyEntry queue=">" memoryLimit="2048"/>
                    <policyEntry topic=">" memoryLimit="2048"/>
                    ...
                  </policyEntries>
                </policyMap>
              </destinationPolicy>
          
          Show
          Gary Tully added a comment - support for modifications to primitive attributes of destinationPolicy <destinationPolicy> <policyMap> <policyEntries> <policyEntry queue= ">" memoryLimit= "2048" /> <policyEntry topic= ">" memoryLimit= "2048" /> ... </policyEntries> </policyMap> </destinationPolicy>
          Gary Tully made changes -
          Field Original Value New Value
          Link This issue breaks AMQ-4702 [ AMQ-4702 ]
          Hide
          Gary Tully added a comment -

          property replacement is there, system properties and the properties file locations from PropertyPlaceholderConfigurer

          Show
          Gary Tully added a comment - property replacement is there, system properties and the properties file locations from PropertyPlaceholderConfigurer
          Hide
          Gary Tully added a comment -
          Show
          Gary Tully added a comment - The tests in https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=tree;f=activemq-runtime-config/src/test/java/org/apache/activemq;hb=HEAD show the subset of xml elements that can now be modified on the fly.
          Gary Tully made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Gary Tully made changes -
          Link This issue relates to AMQ-4738 [ AMQ-4738 ]
          Claus Ibsen made changes -
          Link This issue is related to AMQ-4642 [ AMQ-4642 ]
          Hide
          Tamilmaran added a comment -

          By using this configuration can we change the port of transport connector or add a new transport connector?

          Show
          Tamilmaran added a comment - By using this configuration can we change the port of transport connector or add a new transport connector?
          Hide
          Gary Tully added a comment -

          @tamilmaran - not at the moment. Please open an enhancement jira for that with some detail on the supporting use case, will see to get it done for 5.10

          Show
          Gary Tully added a comment - @tamilmaran - not at the moment. Please open an enhancement jira for that with some detail on the supporting use case, will see to get it done for 5.10
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          19d 22h 32m 1 Gary Tully 03/Sep/13 12:51

            People

            • Assignee:
              Gary Tully
              Reporter:
              Gary Tully
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development