activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r981021 - in /websites/production/activemq/content: cache/main.pageCache dispatch-policies.html logging-interceptor.html version-5-xml-configuration.html xml-configuration.html
Date Tue, 23 Feb 2016 15:22:23 GMT
Author: buildbot
Date: Tue Feb 23 15:22:23 2016
New Revision: 981021

Log:
Production update by buildbot for activemq

Modified:
    websites/production/activemq/content/cache/main.pageCache
    websites/production/activemq/content/dispatch-policies.html
    websites/production/activemq/content/logging-interceptor.html
    websites/production/activemq/content/version-5-xml-configuration.html
    websites/production/activemq/content/xml-configuration.html

Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/activemq/content/dispatch-policies.html
==============================================================================
--- websites/production/activemq/content/dispatch-policies.html (original)
+++ websites/production/activemq/content/dispatch-policies.html Tue Feb 23 15:22:23 2016
@@ -37,7 +37,6 @@
       <script src='http://activemq.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> 
               <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> 
               <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> 
-              <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script> 
          
       <script type="text/javascript"> 
         SyntaxHighlighter.defaults['toolbar'] = false; 
@@ -83,30 +82,46 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h1 id="DispatchPolicies-DispatchPolicies">Dispatch Policies</h1>
-
-<h2 id="DispatchPolicies-Dispatchpoliciesforqueues">Dispatch policies for queues</h2>
-
-<p>Plug-able dispatch policies only apply to topics. For Queues, dispatch is more static, you can choose round robin (the default) or strict order. Before discussing dispatch policies its worth first understanding <a shape="rect" href="what-is-the-prefetch-limit-for.html">the purpose of the prefetch value</a>.</p>
-
-<p>The out of the box configuration of ActiveMQ is designed for high performance and high throughput messaging where there are lots of messages that need to be dispatched to consumers as quickly as possible. So the default prefetch values are fairly large and the default dispatch policy will try and fill the prefetch buffers as quickly as possible.</p>
-
-<p>However with messaging there are many use cases and sometimes the default configuration is not ideal to your use case; when you send a small number of messages, they tend to all go to one consumer unless you've lots of messages.  If you have a large number of consumers and a relatively high <a shape="rect" href="what-is-the-prefetch-limit-for.html">prefetch value</a> and you have a small number of messages that each message takes quite a while to process then the default dispatch policy might result in increasing the amount of time it takes to process all the messages (since the load balancing is not fair for small numbers of messages).</p>
-
-<p>For queues, you can define whether the dispatch will occur in a round-robin fashion (default behavior) or if one consumer's prefetch buffer will be exhausted before the dispatch process selects the next consumer along (strictOrderDispatch).<br clear="none">
-The latter behaviour is enabled by setting the "strictOrderDispatch" attribute on the &lt;policyEntry /&gt; element. E.g.:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h1 id="DispatchPolicies-DispatchPolicies">Dispatch Policies</h1><h2 id="DispatchPolicies-Dispatchpoliciesforqueues">Dispatch policies for queues</h2><p>Plug-able dispatch policies only apply to topics. For Queues, dispatch is more static, you can choose round robin (the default) or strict order. Before discussing dispatch policies its worth first understanding <a shape="rect" href="what-is-the-prefetch-limit-for.html">the purpose of the prefetch value</a>.</p><p>The out of the box configuration of ActiveMQ is designed for high performance and high throughput messaging where there are lots of messages that need to be dispatched to consumers as quickly as possible. So the default prefetch values are fairly large and the default dispatch policy will try and fill the prefetch buffers as quickly as possible.</p><p>However with messaging there are many use cases and sometimes the default configuration is not ideal to your use case; when you send a sm
 all number of messages, they tend to all go to one consumer unless you've lots of messages. If you have a large number of consumers and a relatively high <a shape="rect" href="what-is-the-prefetch-limit-for.html">prefetch value</a> and you have a small number of messages that each message takes quite a while to process then the default dispatch policy might result in increasing the amount of time it takes to process all the messages (since the load balancing is not fair for small numbers of messages).</p><p>For queues, you can define whether the dispatch will occur in a round-robin fashion (default behavior) or if one consumer's prefetch buffer will be exhausted before the dispatch process selects the next consumer along (strictOrderDispatch).<br clear="none"> The latter behaviour is enabled by setting the "strictOrderDispatch" attribute on the &lt;policyEntry /&gt; element. E.g.:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;policyEntry queue="&gt;" strictOrderDispatch="false" /&gt; </pre>
-</div></div>
-<p>Consumer priorities are observed, so if you have several consumers with different <a shape="rect" class="external-link" href="http://activemq.apache.org/consumer-priority.html">priorities</a>, the one with the highest priority will be flooded first until it can take no more, then the next one along, etc</p>
-
-<h2 id="DispatchPolicies-DispatchpoliciesforTopics">Dispatch policies for Topics</h2>
-<p>There are more options for topics because the dispatch policy is plug-able. Any implementation of org.apache.activemq.broker.region.policy.DispatchPolicy will work.<br clear="none">
-The default org.apache.activemq.broker.region.policy.SimpleDispatchPolicy does what one would expect and delivers messages to all subscribers. An example of a more advanced implementation is the org.apache.activemq.broker.region.policy.PriorityNetworkDispatchPolicy which will only dispatch to the highest priority network consumer. This is useful in a loop network topology where there is more than route to a consumer.</p>
-
-<p>Here is an <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/activemq-unit-tests/src/test/resources/org/apache/activemq/xbean/activemq-policy.xml">example of destination policy configuration</a>.</p>
-
-<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+</div></div><p>Consumer priorities are observed, so if you have several consumers with different <a shape="rect" class="external-link" href="http://activemq.apache.org/consumer-priority.html">priorities</a>, the one with the highest priority will be flooded first until it can take no more, then the next one along, etc</p><h2 id="DispatchPolicies-DispatchpoliciesforTopics">Dispatch policies for Topics</h2><p>There are more options for topics because the dispatch policy is plug-able. Any implementation of org.apache.activemq.broker.region.policy.DispatchPolicy will work.<br clear="none"> The default org.apache.activemq.broker.region.policy.SimpleDispatchPolicy does what one would expect and delivers messages to all subscribers. An example of a more advanced implementation is the org.apache.activemq.broker.region.policy.PriorityNetworkDispatchPolicy which will only dispatch to the highest priority network consumer. This is useful in a loop network topology where there is more than rout
 e to a consumer.</p><p>Here is an <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/activemq-unit-tests/src/test/resources/org/apache/activemq/xbean/activemq-policy.xml">example of destination policy configuration</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;destinationPolicy&gt;
+  &lt;policyMap&gt;
+	&lt;policyEntries&gt;
+	  &lt;policyEntry topic="FOO.&gt;"&gt;
+		&lt;dispatchPolicy&gt;
+		  &lt;roundRobinDispatchPolicy /&gt;
+		&lt;/dispatchPolicy&gt;
+		&lt;subscriptionRecoveryPolicy&gt;
+		  &lt;lastImageSubscriptionRecoveryPolicy /&gt;
+		&lt;/subscriptionRecoveryPolicy&gt;
+	  &lt;/policyEntry&gt;
+	  &lt;policyEntry topic="ORDERS.&gt;"&gt;
+		&lt;dispatchPolicy&gt;
+		  &lt;strictOrderDispatchPolicy /&gt;
+		&lt;/dispatchPolicy&gt;
+		&lt;!--  1 minutes worth --&gt;
+		&lt;subscriptionRecoveryPolicy&gt;
+		  &lt;timedSubscriptionRecoveryPolicy recoverDuration="60000" /&gt;
+		&lt;/subscriptionRecoveryPolicy&gt;
+	  &lt;/policyEntry&gt;
+	  &lt;policyEntry topic="PRICES.&gt;"&gt;
+		&lt;!-- lets force old messages to be discarded for slow consumers --&gt;
+		&lt;pendingMessageLimitStrategy&gt;
+		  &lt;constantPendingMessageLimitStrategy limit="10"/&gt;
+		&lt;/pendingMessageLimitStrategy&gt;
+		&lt;!--  10 seconds worth --&gt;
+		&lt;subscriptionRecoveryPolicy&gt;
+		  &lt;timedSubscriptionRecoveryPolicy recoverDuration="10000" /&gt;
+		&lt;/subscriptionRecoveryPolicy&gt;
+		
+	  &lt;/policyEntry&gt;
+	  &lt;policyEntry tempTopic="true" advisoryForConsumed="true" /&gt;
+	  &lt;policyEntry tempQueue="true" advisoryForConsumed="true" /&gt;
+	&lt;/policyEntries&gt;
+  &lt;/policyMap&gt;
+&lt;/destinationPolicy&gt;</pre>
+</div></div></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/activemq/content/logging-interceptor.html
==============================================================================
--- websites/production/activemq/content/logging-interceptor.html (original)
+++ websites/production/activemq/content/logging-interceptor.html Tue Feb 23 15:22:23 2016
@@ -35,9 +35,7 @@
           <link href='http://activemq.apache.org/styles/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' /> 
       <link href='http://activemq.apache.org/styles/highlighter/styles/shThemeEclipse.css' rel='stylesheet' type='text/css' /> 
       <script src='http://activemq.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> 
-              <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> 
               <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> 
-              <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script> 
          
       <script type="text/javascript"> 
         SyntaxHighlighter.defaults['toolbar'] = false; 
@@ -83,7 +81,27 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="LoggingInterceptor-LoggingInterceptor">Logging Interceptor</h2><p>The Logging Interceptor is a pretty trivial <a shape="rect" href="interceptors.html">Interceptor</a> which just logs to <a shape="rect" class="external-link" href="http://jakarta.apache.org/commons/logging/">Jakarta Commons Logging</a> or <a shape="rect" class="external-link" href="http://logging.apache.org/log4j/docs/">log4j</a> as messages are sent or acknowledged on a broker.</p><p>The default logging level used is <strong>INFO</strong>. If you want to increase/reduce the logging you can use <a shape="rect" href="how-do-i-change-the-logging.html">change it via commons logging or log4j</a>.</p><p>As of version 5.3 the logging Interceptor is more configurable. The idea is to log all events but be able to turn off logging for certain event groups by configuration.</p><p>Currently the following groups are supported:</p><div class="table-wrap"><table class="confluenceTable">
 <tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p><strong>Attribute</strong></p></th><th colspan="1" rowspan="1" class="confluenceTh"><p><strong>Description</strong></p></th><th colspan="1" rowspan="1" class="confluenceTh"><p><strong>Default Value</strong></p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logAll</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Log all Events</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logConnectionEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to connections and sessions</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logTransactionEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to transaction handling</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>fals
 e</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logConsumerEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to consuming messages</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logProducerEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to producing messages</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logInternalEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events normally not of Interest for users like failover, querying internal objects etc</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logSessionEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to adding and removing sessions</p
 ></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr></tbody></table></div><p>Only connection events logging is enabled by default.</p><p>You can enable the logging interceptor using the following <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/activemq-unit-tests/src/test/resources/org/apache/activemq/util/plugin-broker.xml">XML configuration</a>. This example enables all logging and disables the connection event logging:</p><div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div></div>
+<div class="wiki-content maincontent"><h2 id="LoggingInterceptor-LoggingInterceptor">Logging Interceptor</h2><p>The Logging Interceptor is a pretty trivial <a shape="rect" href="interceptors.html">Interceptor</a> which just logs to <a shape="rect" class="external-link" href="http://jakarta.apache.org/commons/logging/">Jakarta Commons Logging</a> or <a shape="rect" class="external-link" href="http://logging.apache.org/log4j/docs/">log4j</a> as messages are sent or acknowledged on a broker.</p><p>The default logging level used is <strong>INFO</strong>. If you want to increase/reduce the logging you can use <a shape="rect" href="how-do-i-change-the-logging.html">change it via commons logging or log4j</a>.</p><p>As of version 5.3 the logging Interceptor is more configurable. The idea is to log all events but be able to turn off logging for certain event groups by configuration.</p><p>Currently the following groups are supported:</p><div class="table-wrap"><table class="confluenceTable">
 <tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p><strong>Attribute</strong></p></th><th colspan="1" rowspan="1" class="confluenceTh"><p><strong>Description</strong></p></th><th colspan="1" rowspan="1" class="confluenceTh"><p><strong>Default Value</strong></p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logAll</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Log all Events</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logConnectionEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to connections and sessions</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logTransactionEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to transaction handling</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>fals
 e</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logConsumerEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to consuming messages</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logProducerEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to producing messages</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logInternalEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events normally not of Interest for users like failover, querying internal objects etc</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>false</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logSessionEvents</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events related to adding and removing sessions</p
 ></td><td colspan="1" rowspan="1" class="confluenceTd"><p>true</p></td></tr></tbody></table></div><p>Only connection events logging is enabled by default.</p><p>You can enable the logging interceptor using the following <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/activemq-unit-tests/src/test/resources/org/apache/activemq/util/plugin-broker.xml">XML configuration</a>. This example enables all logging and disables the connection event logging:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans 
+  xmlns="http://www.springframework.org/schema/beans" 
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"&gt;
+  &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/&gt;
+  &lt;broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core"&gt;
+    &lt;plugins&gt;
+    
+      &lt;!-- lets enable detailed logging in the broker but ignore ConnectionEvents --&gt;
+      &lt;loggingBrokerPlugin logAll="true" logConnectionEvents="false"/&gt;
+      
+      &lt;timeStampingBrokerPlugin zeroExpirationOverride="1000" ttlCeiling="60000" futureOnly="true"/&gt;    
+      &lt;traceBrokerPathPlugin/&gt;
+      
+    &lt;/plugins&gt;
+  &lt;/broker&gt;
+&lt;/beans&gt;</pre>
+</div></div></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/activemq/content/version-5-xml-configuration.html
==============================================================================
--- websites/production/activemq/content/version-5-xml-configuration.html (original)
+++ websites/production/activemq/content/version-5-xml-configuration.html Tue Feb 23 15:22:23 2016
@@ -35,9 +35,7 @@
           <link href='http://activemq.apache.org/styles/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' /> 
       <link href='http://activemq.apache.org/styles/highlighter/styles/shThemeEclipse.css' rel='stylesheet' type='text/css' /> 
       <script src='http://activemq.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> 
-              <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> 
               <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> 
-              <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script> 
          
       <script type="text/javascript"> 
         SyntaxHighlighter.defaults['toolbar'] = false; 
@@ -83,43 +81,108 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><ul><li>transport connectors which consist of transport channels and wire formats TODO: add a link to a page explaining what transport connectors are how to configure and use them.</li><li>network connectors using network channels or discovery TODO: add a link to a page explaining what network connectors are how to configure and use them.</li><li>discovery agents TODO: add a link to a page explaining what discovery agents are how to configure and use them.</li><li>persistence providers &amp; locations TODO: add a link to a page explaining what persistence providers are how to configure and use them.</li><li>custom message containers (such as last image caching etc)</li></ul>
-
-
-<p>We use <a shape="rect" class="external-link" href="http://xbean.org/" rel="nofollow">XBean</a> to perform the XML configuration.</p>
-
-<p>For details of the XML see the <a shape="rect" href="xml-reference.html">Xml Reference</a></p>
-<div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Be careful with broker names and URIs</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-<p>Make sure you do not use any strange characters in the names of brokers as they are converted to URIs which <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html" rel="nofollow">do not allow things like underscores</a> in them etc.</p></div></div>
-
-<h2 id="Version5XMLConfiguration-Examples">Examples</h2>
-
-<p>The default ActiveMQ configuration: <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml">current default config</a>.</p>
-
-<div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div>
-<p>From a binary distribution there is an <em>activemq</em> script allowing you to run a Message Broker as a stand alone process from the command line easily providing the $ACTIVEMQ_HOME/bin directory is on your PATH.</p>
-
-
-<h2 id="Version5XMLConfiguration-Configuringembeddedbrokers">Configuring embedded brokers</h2>
-
-<p>You can also use the XML Configuration to configure <a shape="rect" href="how-do-i-embed-a-broker-inside-a-connection.html">embedded brokers</a>. For example using the JNDI configuration mechanism you can do the following<br clear="none">
-<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java">BrokerXmlConfigFromJNDITest</a><br clear="none">
-Or of you want to explicitly configure the embedded broker via Java code you can do the following<br clear="none">
-<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java">BrokerXmlConfigTest</a></p>
-
-<h2 id="Version5XMLConfiguration-UserSubmittedConfigurations">User Submitted Configurations</h2>
-
-<p>We have a page which allows users to submit details of their configurations.</p>
-<ul><li><a shape="rect" href="user-submitted-configurations.html">User Submitted Configurations</a></li></ul>
-
-
-<h2 id="Version5XMLConfiguration-Background">Background</h2>
-
-<p>Since ActiveMQ has so many strategy pattern plugins for transports, wire formats, persistence and many other things, we wanted to leave the configuration format open so that you the developer can configure and extend ActiveMQ in any direction you wish.</p>
-
-<p>So we use the <a shape="rect" class="external-link" href="http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-basics" rel="nofollow">Spring XML</a> configuration file format, which allows any beans / POJOs to be wired together and configured. However often Spring's XML can be kinda verbose at times, so we have implemented an ActiveMQ extension to the Spring XML which knows about the common, standard ActiveMQ things you're likely to do (e.g. tags like connector, wireFormat, serverTransport, persistence) - but at any time you can fall back to the normal Spring way of doing things (with tags like bean, property etc).</p>
-
-<p>To see documentation of the XML file we use or to get access to the XSD/DTD see the <a shape="rect" href="xml-reference.html">Xml Reference</a></p></div>
+<div class="wiki-content maincontent"><ul><li>transport connectors which consist of transport channels and wire formats TODO: add a link to a page explaining what transport connectors are how to configure and use them.</li><li>network connectors using network channels or discovery TODO: add a link to a page explaining what network connectors are how to configure and use them.</li><li>discovery agents TODO: add a link to a page explaining what discovery agents are how to configure and use them.</li><li>persistence providers &amp; locations TODO: add a link to a page explaining what persistence providers are how to configure and use them.</li><li>custom message containers (such as last image caching etc)</li></ul><p>We use <a shape="rect" class="external-link" href="http://xbean.org/" rel="nofollow">XBean</a> to perform the XML configuration.</p><p>For details of the XML see the <a shape="rect" href="xml-reference.html">Xml Reference</a></p><div class="confluence-information-macro con
 fluence-information-macro-warning"><p class="title">Be careful with broker names and URIs</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Make sure you do not use any strange characters in the names of brokers as they are converted to URIs which <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html" rel="nofollow">do not allow things like underscores</a> in them etc.</p></div></div><h2 id="Version5XMLConfiguration-Examples">Examples</h2><p>The default ActiveMQ configuration: <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml">current default config</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"&gt;
+    &lt;!-- Allows us to use system properties as variables in this configuration file --&gt;
+    &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
+        &lt;property name="locations"&gt;
+            &lt;value&gt;file:${activemq.conf}/credentials.properties&lt;/value&gt;
+        &lt;/property&gt;
+    &lt;/bean&gt;
+   &lt;!-- Allows accessing the server log --&gt;
+    &lt;bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
+          lazy-init="false" scope="singleton"
+          init-method="start" destroy-method="stop"&gt;
+    &lt;/bean&gt;
+    &lt;!--
+        The &lt;broker&gt; element is used to configure the ActiveMQ broker.
+    --&gt;
+    &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"&gt;
+        &lt;destinationPolicy&gt;
+            &lt;policyMap&gt;
+              &lt;policyEntries&gt;
+                &lt;policyEntry topic="&gt;" &gt;
+                    &lt;!-- The constantPendingMessageLimitStrategy is used to prevent
+                         slow topic consumers to block producers and affect other consumers
+                         by limiting the number of messages that are retained
+                         For more information, see:
+                         http://activemq.apache.org/slow-consumer-handling.html
+                    --&gt;
+                  &lt;pendingMessageLimitStrategy&gt;
+                    &lt;constantPendingMessageLimitStrategy limit="1000"/&gt;
+                  &lt;/pendingMessageLimitStrategy&gt;
+                &lt;/policyEntry&gt;
+              &lt;/policyEntries&gt;
+            &lt;/policyMap&gt;
+        &lt;/destinationPolicy&gt;
+
+        &lt;!--
+            The managementContext is used to configure how ActiveMQ is exposed in
+            JMX. By default, ActiveMQ uses the MBean server that is started by
+            the JVM. For more information, see:
+            http://activemq.apache.org/jmx.html
+        --&gt;
+        &lt;managementContext&gt;
+            &lt;managementContext createConnector="false"/&gt;
+        &lt;/managementContext&gt;
+        &lt;!--
+            Configure message persistence for the broker. The default persistence
+            mechanism is the KahaDB store (identified by the kahaDB tag).
+            For more information, see:
+            http://activemq.apache.org/persistence.html
+        --&gt;
+        &lt;persistenceAdapter&gt;
+            &lt;kahaDB directory="${activemq.data}/kahadb"/&gt;
+        &lt;/persistenceAdapter&gt;
+
+          &lt;!--
+            The systemUsage controls the maximum amount of space the broker will
+            use before disabling caching and/or slowing down producers. For more information, see:
+            http://activemq.apache.org/producer-flow-control.html
+          --&gt;
+          &lt;systemUsage&gt;
+            &lt;systemUsage&gt;
+                &lt;memoryUsage&gt;
+                    &lt;memoryUsage percentOfJvmHeap="70" /&gt;
+                &lt;/memoryUsage&gt;
+                &lt;storeUsage&gt;
+                    &lt;storeUsage limit="100 gb"/&gt;
+                &lt;/storeUsage&gt;
+                &lt;tempUsage&gt;
+                    &lt;tempUsage limit="50 gb"/&gt;
+                &lt;/tempUsage&gt;
+            &lt;/systemUsage&gt;
+        &lt;/systemUsage&gt;
+        &lt;!--
+            The transport connectors expose ActiveMQ over a given protocol to
+            clients and other brokers. For more information, see:
+            http://activemq.apache.org/configuring-transports.html
+        --&gt;
+        &lt;transportConnectors&gt;
+            &lt;!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --&gt;
+            &lt;transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+        &lt;/transportConnectors&gt;
+        &lt;!-- destroy the spring context on shutdown to stop jetty --&gt;
+        &lt;shutdownHooks&gt;
+            &lt;bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /&gt;
+        &lt;/shutdownHooks&gt;
+    &lt;/broker&gt;
+    &lt;!--
+        Enable web consoles, REST and Ajax APIs and demos
+        The web consoles requires by default login, you can disable this in the jetty.xml file
+        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
+    --&gt;
+    &lt;import resource="jetty.xml"/&gt;
+&lt;/beans&gt;</pre>
+</div></div><p>From a binary distribution there is an <em>activemq</em> script allowing you to run a Message Broker as a stand alone process from the command line easily providing the $ACTIVEMQ_HOME/bin directory is on your PATH.</p><h2 id="Version5XMLConfiguration-Configuringembeddedbrokers">Configuring embedded brokers</h2><p>You can also use the XML Configuration to configure <a shape="rect" href="how-do-i-embed-a-broker-inside-a-connection.html">embedded brokers</a>. For example using the JNDI configuration mechanism you can do the following<br clear="none"> <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java">BrokerXmlConfigFromJNDITest</a><br clear="none"> Or of you want to explicitly configure the embedded broker via Java code you can do the following<br clear="none"> <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trun
 k/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java">BrokerXmlConfigTest</a></p><h2 id="Version5XMLConfiguration-UserSubmittedConfigurations">User Submitted Configurations</h2><p>We have a page which allows users to submit details of their configurations.</p><ul><li><a shape="rect" href="user-submitted-configurations.html">User Submitted Configurations</a></li></ul><h2 id="Version5XMLConfiguration-Background">Background</h2><p>Since ActiveMQ has so many strategy pattern plugins for transports, wire formats, persistence and many other things, we wanted to leave the configuration format open so that you the developer can configure and extend ActiveMQ in any direction you wish.</p><p>So we use the <a shape="rect" class="external-link" href="http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-basics" rel="nofollow">Spring XML</a> configuration file format, which allows any beans / POJOs to be wired together and configured. However ofte
 n Spring's XML can be kinda verbose at times, so we have implemented an ActiveMQ extension to the Spring XML which knows about the common, standard ActiveMQ things you're likely to do (e.g. tags like connector, wireFormat, serverTransport, persistence) - but at any time you can fall back to the normal Spring way of doing things (with tags like bean, property etc).</p><p>To see documentation of the XML file we use or to get access to the XSD/DTD see the <a shape="rect" href="xml-reference.html">Xml Reference</a></p></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/activemq/content/xml-configuration.html
==============================================================================
--- websites/production/activemq/content/xml-configuration.html (original)
+++ websites/production/activemq/content/xml-configuration.html Tue Feb 23 15:22:23 2016
@@ -37,7 +37,6 @@
       <script src='http://activemq.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> 
               <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> 
               <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> 
-              <script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script> 
          
       <script type="text/javascript"> 
         SyntaxHighlighter.defaults['toolbar'] = false; 
@@ -83,7 +82,108 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><p>We support an XML deployment descriptor for configuring the ActiveMQ Message Broker. There are many things which can be configured such as</p><ul><li><a shape="rect" href="configuring-version-5-transports.html">transport connectors</a> which consist of transport channels and wire formats</li><li><a shape="rect" href="networks-of-brokers.html">network connectors</a> using network channels or discovery agents</li><li><a shape="rect" href="persistence.html">persistence providers</a> &amp; locations</li><li>custom message containers (such as last image caching etc)</li></ul><p>So we decided that using XML would make this configuration much easier. From version 4.0 onwards we use <a shape="rect" class="external-link" href="http://xbean.org/" rel="nofollow">XBean</a> to perform the XML configuration.</p><p>For details of the XML see the <a shape="rect" href="xml-reference.html">Xml Reference</a></p><div class="confluence-information-macro confluenc
 e-information-macro-warning"><p class="title">Be careful with broker names and URIs</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Make sure you do not use any strange characters in the names of brokers as they are converted to URIs which <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html" rel="nofollow">do not allow things like underscores</a> in them etc.</p></div></div><h2 id="XmlConfiguration-Examples">Examples</h2><p>The default ActiveMQ configuration: <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml">current default config</a>.</p><div class="error"><span class="error">Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20</span> </div><p>From a binary distribution, from version 1.1 onwards there is an <em>acti
 vemq</em> script allowing you to run a Message Broker as a stand alone process from the command line easily providing the $ACTIVEMQ_HOME/bin directory is on your PATH.</p><p><strong>AMQ 4.x</strong></p><p>if myConfig.xml is in the classpath</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><p>We support an XML deployment descriptor for configuring the ActiveMQ Message Broker. There are many things which can be configured such as</p><ul><li><a shape="rect" href="configuring-version-5-transports.html">transport connectors</a> which consist of transport channels and wire formats</li><li><a shape="rect" href="networks-of-brokers.html">network connectors</a> using network channels or discovery agents</li><li><a shape="rect" href="persistence.html">persistence providers</a> &amp; locations</li><li>custom message containers (such as last image caching etc)</li></ul><p>So we decided that using XML would make this configuration much easier. From version 4.0 onwards we use <a shape="rect" class="external-link" href="http://xbean.org/" rel="nofollow">XBean</a> to perform the XML configuration.</p><p>For details of the XML see the <a shape="rect" href="xml-reference.html">Xml Reference</a></p><div class="confluence-information-macro confluenc
 e-information-macro-warning"><p class="title">Be careful with broker names and URIs</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Make sure you do not use any strange characters in the names of brokers as they are converted to URIs which <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html" rel="nofollow">do not allow things like underscores</a> in them etc.</p></div></div><h2 id="XmlConfiguration-Examples">Examples</h2><p>The default ActiveMQ configuration: <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml">current default config</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"&gt;
+    &lt;!-- Allows us to use system properties as variables in this configuration file --&gt;
+    &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
+        &lt;property name="locations"&gt;
+            &lt;value&gt;file:${activemq.conf}/credentials.properties&lt;/value&gt;
+        &lt;/property&gt;
+    &lt;/bean&gt;
+   &lt;!-- Allows accessing the server log --&gt;
+    &lt;bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
+          lazy-init="false" scope="singleton"
+          init-method="start" destroy-method="stop"&gt;
+    &lt;/bean&gt;
+    &lt;!--
+        The &lt;broker&gt; element is used to configure the ActiveMQ broker.
+    --&gt;
+    &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"&gt;
+        &lt;destinationPolicy&gt;
+            &lt;policyMap&gt;
+              &lt;policyEntries&gt;
+                &lt;policyEntry topic="&gt;" &gt;
+                    &lt;!-- The constantPendingMessageLimitStrategy is used to prevent
+                         slow topic consumers to block producers and affect other consumers
+                         by limiting the number of messages that are retained
+                         For more information, see:
+                         http://activemq.apache.org/slow-consumer-handling.html
+                    --&gt;
+                  &lt;pendingMessageLimitStrategy&gt;
+                    &lt;constantPendingMessageLimitStrategy limit="1000"/&gt;
+                  &lt;/pendingMessageLimitStrategy&gt;
+                &lt;/policyEntry&gt;
+              &lt;/policyEntries&gt;
+            &lt;/policyMap&gt;
+        &lt;/destinationPolicy&gt;
+
+        &lt;!--
+            The managementContext is used to configure how ActiveMQ is exposed in
+            JMX. By default, ActiveMQ uses the MBean server that is started by
+            the JVM. For more information, see:
+            http://activemq.apache.org/jmx.html
+        --&gt;
+        &lt;managementContext&gt;
+            &lt;managementContext createConnector="false"/&gt;
+        &lt;/managementContext&gt;
+        &lt;!--
+            Configure message persistence for the broker. The default persistence
+            mechanism is the KahaDB store (identified by the kahaDB tag).
+            For more information, see:
+            http://activemq.apache.org/persistence.html
+        --&gt;
+        &lt;persistenceAdapter&gt;
+            &lt;kahaDB directory="${activemq.data}/kahadb"/&gt;
+        &lt;/persistenceAdapter&gt;
+
+          &lt;!--
+            The systemUsage controls the maximum amount of space the broker will
+            use before disabling caching and/or slowing down producers. For more information, see:
+            http://activemq.apache.org/producer-flow-control.html
+          --&gt;
+          &lt;systemUsage&gt;
+            &lt;systemUsage&gt;
+                &lt;memoryUsage&gt;
+                    &lt;memoryUsage percentOfJvmHeap="70" /&gt;
+                &lt;/memoryUsage&gt;
+                &lt;storeUsage&gt;
+                    &lt;storeUsage limit="100 gb"/&gt;
+                &lt;/storeUsage&gt;
+                &lt;tempUsage&gt;
+                    &lt;tempUsage limit="50 gb"/&gt;
+                &lt;/tempUsage&gt;
+            &lt;/systemUsage&gt;
+        &lt;/systemUsage&gt;
+        &lt;!--
+            The transport connectors expose ActiveMQ over a given protocol to
+            clients and other brokers. For more information, see:
+            http://activemq.apache.org/configuring-transports.html
+        --&gt;
+        &lt;transportConnectors&gt;
+            &lt;!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --&gt;
+            &lt;transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+            &lt;transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
+        &lt;/transportConnectors&gt;
+        &lt;!-- destroy the spring context on shutdown to stop jetty --&gt;
+        &lt;shutdownHooks&gt;
+            &lt;bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /&gt;
+        &lt;/shutdownHooks&gt;
+    &lt;/broker&gt;
+    &lt;!--
+        Enable web consoles, REST and Ajax APIs and demos
+        The web consoles requires by default login, you can disable this in the jetty.xml file
+        Take a look at ${ACTIVEMQ_HOME}/conf/jetty.xml for more details
+    --&gt;
+    &lt;import resource="jetty.xml"/&gt;
+&lt;/beans&gt;</pre>
+</div></div><p>From a binary distribution, from version 1.1 onwards there is an <em>activemq</em> script allowing you to run a Message Broker as a stand alone process from the command line easily providing the $ACTIVEMQ_HOME/bin directory is on your PATH.</p><p><strong>AMQ 4.x</strong></p><p>if myConfig.xml is in the classpath</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">activemq  xbean:myConfig.xml
 </pre>
 </div></div><p>or to use the file path system</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">




Mime
View raw message