blob: beeb1d3c3b8e52a09e6467185e40115157fafa5e [file] [log] [blame]
<div class="wiki-content maincontent"><p>From version 5.9.0 a new broker plugin will allow selective changes to a broker xml configuration to take effect without broker restart.<br clear="none">
Consider a retail environment where there are central processors (hubs) and stores(spokes). It is advantageous to be able to add a new store<br clear="none">
without any down time.<br clear="none">
The addition of a new store could entail a new network connector and some new authorization policies, both of which can now be modified on the fly.</p>
<p>The plugin is configured via the broker xml configuration as follows:</p>
<structured-macro ac:macro-id="2e5295a6-1d1e-45bc-9bdf-81324f278474" ac:name="code" ac:schema-version="1"><plain-text-body>&lt;broker xmlns="http://activemq.apache.org/schema/core" start="false" ... &gt;
&lt;plugins&gt;
&lt;runtimeConfigurationPlugin checkPeriod="1000" /&gt;
&lt;/plugins&gt;
...
&lt;/broker&gt;
</plain-text-body></structured-macro>
<p>Note: the start="false" attribute. It ensures that xbean-spring does not auto start the broker when the application context is loading. <br clear="none">
This ensures that the plugins reference to the broker is fully initialized before it is used and the xml configuration location can be successfully resolved.</p>
<p>The checkPeriod when &gt; 0 is the time in milliseconds between checks for changes to the lastupdate timestamp of the broker xml configuration url.<br clear="none">
If checkPeriod is 0 (default) there is no automatic check for changes but a manual check can be triggered via JMX.</p>
<p>Configuration elements that support runtime modification</p>
<ul><li>&lt;networkConnectors&gt;</li><li>&lt;destinationPolicy&gt;&lt;policyMap&gt;&lt;policyEntries&gt;</li><li>&lt;plugins&gt;&lt;authorizationPlugin&gt;&lt;map&gt;&lt;authorizationMap&gt;&lt;authorizationEntries&gt;</li><li>&lt;destinationInterceptors&gt;&lt;virtualDestinationInterceptor&gt;&lt;virtualDestinations&gt;</li></ul>
<p>Some more implementation detail and links to the tests can be found in <a shape="rect" href="https://issues.apache.org/jira/browse/AMQ-4682">AMQ-4682</a></p></div>