You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by bu...@apache.org on 2013/07/10 23:21:25 UTC

svn commit: r869062 - in /websites/production/activemq/content: cache/main.pageCache message-redelivery-and-dlq-handling.html stomp.html

Author: buildbot
Date: Wed Jul 10 21:21:25 2013
New Revision: 869062

Log:
Production update by buildbot for activemq

Modified:
    websites/production/activemq/content/cache/main.pageCache
    websites/production/activemq/content/message-redelivery-and-dlq-handling.html
    websites/production/activemq/content/stomp.html

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

Modified: websites/production/activemq/content/message-redelivery-and-dlq-handling.html
==============================================================================
--- websites/production/activemq/content/message-redelivery-and-dlq-handling.html (original)
+++ websites/production/activemq/content/message-redelivery-and-dlq-handling.html Wed Jul 10 21:21:25 2013
@@ -50,8 +50,8 @@
       <div>
 
 <!-- Banner -->
-
-	<div id="asf_logo">
+<p>
+	</p><div id="asf_logo">
 	<div id="activemq_logo">
             <a shape="rect" style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;" href="http://activemq.apache.org" title="The most popular and powerful open source Message Broker">ActiveMQ</a> &#8482;
             <a shape="rect" style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;" href="http://www.apache.org" title="The Apache Software Foundation">ASF</a>
@@ -81,13 +81,13 @@
 <p>The broker transmits the default delivery policy that he prefers to a client connection in his BrokerInfo command packet.  But the client can override the policy settings by using the ActiveMQConnection.getRedeliveryPolicy() method:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 RedeliveryPolicy policy = connection.getRedeliveryPolicy();
 policy.setInitialRedeliveryDelay(500);
 policy.setBackOffMultiplier(2);
-policy.setUseExponentialBackOff(<span class="code-keyword">true</span>);
+policy.setUseExponentialBackOff(true);
 policy.setMaximumRedeliveries(2);
-</pre>
+]]></script>
 </div></div>
 
 <p>Once a message's redelivery attempts exceeds the maximumRedeliveries configured for the <a shape="rect" href="redelivery-policy.html" title="Redelivery Policy">Redelivery Policy</a>, a "Poison ack" is sent back to the broker letting him know that the message was considered a poison pill.  The Broker then takes the message and sends it to a Dead Letter Queue so that it can be analyzed later on. </p>
@@ -95,28 +95,28 @@ policy.setMaximumRedeliveries(2);
 <p>The default Dead Letter Queue in ActiveMQ is called ActiveMQ.DLQ; all undeliverable messages will get sent to this queue and this can be difficult to manage. So, you can set an "individualDeadLetterStrategy" in the destination policy map of the <tt>activemq.xml</tt> configuration file, which allows you to specify a specific dead letter queue prefix for a given queue or topic. You can apply this strategy using wild card if you like so that all queues get their own dead-letter queue, as is shown in the example below. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;broker...&gt;</span>
-  <span class="code-tag">&lt;destinationPolicy&gt;</span>
-    <span class="code-tag">&lt;policyMap&gt;</span>
-      <span class="code-tag">&lt;policyEntries&gt;</span>
-        <span class="code-tag"><span class="code-comment">&lt;!-- Set the following policy on all queues using the '&gt;</span>' wildcard --&gt;</span>
-        <span class="code-tag">&lt;policyEntry queue=<span class="code-quote">"&gt;</span>"</span>&gt;
-          <span class="code-tag">&lt;deadLetterStrategy&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;broker...&gt;
+  &lt;destinationPolicy&gt;
+    &lt;policyMap&gt;
+      &lt;policyEntries&gt;
+        &lt;!-- Set the following policy on all queues using the '&gt;' wildcard --&gt;
+        &lt;policyEntry queue="&gt;"&gt;
+          &lt;deadLetterStrategy&gt;
             &lt;!--
               Use the prefix 'DLQ.' for the destination name, and make
               the DLQ a queue rather than a topic
             --&gt;
             &lt;individualDeadLetterStrategy
-              queuePrefix=<span class="code-quote">"DLQ."</span> useQueueForQueueMessages=<span class="code-quote">"true"</span> /&gt;
-          <span class="code-tag">&lt;/deadLetterStrategy&gt;</span>
-        <span class="code-tag">&lt;/policyEntry&gt;</span>
-      <span class="code-tag">&lt;/policyEntries&gt;</span>
-    <span class="code-tag">&lt;/policyMap&gt;</span>
-  <span class="code-tag">&lt;/destinationPolicy&gt;</span>
+              queuePrefix="DLQ." useQueueForQueueMessages="true" /&gt;
+          &lt;/deadLetterStrategy&gt;
+        &lt;/policyEntry&gt;
+      &lt;/policyEntries&gt;
+    &lt;/policyMap&gt;
+  &lt;/destinationPolicy&gt;
   ...
-<span class="code-tag">&lt;/broker&gt;</span>
-</pre>
+&lt;/broker&gt;
+]]></script>
 </div></div>
 
 <p>See the <a shape="rect" href="redelivery-policy.html" title="Redelivery Policy">Redelivery Policy</a> section for some more detail on the policy options.</p>
@@ -126,28 +126,28 @@ policy.setMaximumRedeliveries(2);
 <p>Some folks simply need expired messages to be discarded instead of sent to the DLQ (i.e., skip the DLQ entirely). This simplifies the management of the DLQ so that you're not sifting through loads of expired messages to find messages with real problems. To tell ActiveMQ to just discard expired messages, configure the <tt>processExpired</tt> property to false on a dead letter strategy: </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;broker...&gt;</span>
-  <span class="code-tag">&lt;destinationPolicy&gt;</span>
-   <span class="code-tag">&lt;policyMap&gt;</span>
-     <span class="code-tag">&lt;policyEntries&gt;</span>
-       <span class="code-tag"><span class="code-comment">&lt;!-- Set the following policy on all queues using the '&gt;</span>' wildcard --&gt;</span>
-       <span class="code-tag">&lt;policyEntry queue=<span class="code-quote">"&gt;</span>"</span>&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;broker...&gt;
+  &lt;destinationPolicy&gt;
+   &lt;policyMap&gt;
+     &lt;policyEntries&gt;
+       &lt;!-- Set the following policy on all queues using the '&gt;' wildcard --&gt;
+       &lt;policyEntry queue="&gt;"&gt;
          &lt;!-- 
            Tell the dead letter strategy not to process expired messages
            so that they will just be discarded instead of being sent to
            the DLQ 
          --&gt;
-         <span class="code-tag">&lt;deadLetterStrategy&gt;</span>
-           <span class="code-tag">&lt;sharedDeadLetterStrategy processExpired=<span class="code-quote">"false"</span> /&gt;</span>
-         <span class="code-tag">&lt;/deadLetterStrategy&gt;</span>
-       <span class="code-tag">&lt;/policyEntry&gt;</span>
-     <span class="code-tag">&lt;/policyEntries&gt;</span>
-   <span class="code-tag">&lt;/policyMap&gt;</span>
-  <span class="code-tag">&lt;/destinationPolicy&gt;</span>
+         &lt;deadLetterStrategy&gt;
+           &lt;sharedDeadLetterStrategy processExpired="false" /&gt;
+         &lt;/deadLetterStrategy&gt;
+       &lt;/policyEntry&gt;
+     &lt;/policyEntries&gt;
+   &lt;/policyMap&gt;
+  &lt;/destinationPolicy&gt;
 ...
-<span class="code-tag">&lt;/broker&gt;</span>
-</pre>
+&lt;/broker&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="MessageRedeliveryandDLQHandling-Placenonpersistentmessagesontothedeadletterqueue"></a>Place non-persistent messages onto the dead-letter queue</h3>
@@ -155,27 +155,27 @@ policy.setMaximumRedeliveries(2);
 <p>By default, ActiveMQ will not place undeliverable <em>non-persistent</em> messages on the dead-letter queue.  The rationale for this behavior is that if the application doesn't care enough to make the message persistent, then there is little or no value in recording that the message was undeliverable. If you do want to place non-persistent messages on the dead-letter queue, then you should set <tt>processNonPersistent="true"</tt> on the dead-letter strategy. </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;broker...&gt;</span>
-  <span class="code-tag">&lt;destinationPolicy&gt;</span>
-   <span class="code-tag">&lt;policyMap&gt;</span>
-     <span class="code-tag">&lt;policyEntries&gt;</span>
-       <span class="code-tag"><span class="code-comment">&lt;!-- Set the following policy on all queues using the '&gt;</span>' wildcard --&gt;</span>
-       <span class="code-tag">&lt;policyEntry queue=<span class="code-quote">"&gt;</span>"</span>&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;broker...&gt;
+  &lt;destinationPolicy&gt;
+   &lt;policyMap&gt;
+     &lt;policyEntries&gt;
+       &lt;!-- Set the following policy on all queues using the '&gt;' wildcard --&gt;
+       &lt;policyEntry queue="&gt;"&gt;
          &lt;!-- 
            Tell the dead letter strategy to also place non-persisted messages 
            onto the dead-letter queue if they can't be delivered.
          --&gt;
-         <span class="code-tag">&lt;deadLetterStrategy&gt;</span>
-           <span class="code-tag">&lt;sharedDeadLetterStrategy processNonPersistent=<span class="code-quote">"true"</span> /&gt;</span>
-         <span class="code-tag">&lt;/deadLetterStrategy&gt;</span>
-       <span class="code-tag">&lt;/policyEntry&gt;</span>
-     <span class="code-tag">&lt;/policyEntries&gt;</span>
-   <span class="code-tag">&lt;/policyMap&gt;</span>
-  <span class="code-tag">&lt;/destinationPolicy&gt;</span>
+         &lt;deadLetterStrategy&gt;
+           &lt;sharedDeadLetterStrategy processNonPersistent="true" /&gt;
+         &lt;/deadLetterStrategy&gt;
+       &lt;/policyEntry&gt;
+     &lt;/policyEntries&gt;
+   &lt;/policyMap&gt;
+  &lt;/destinationPolicy&gt;
 ...
-<span class="code-tag">&lt;/broker&gt;</span>
-</pre>
+&lt;/broker&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="MessageRedeliveryandDLQHandling-TheDiscardingDLQPlugin"></a>The Discarding DLQ Plugin </h3>
@@ -185,29 +185,29 @@ policy.setMaximumRedeliveries(2);
 <p>Below is an example of a basic configuration to drop everything: </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;beans&gt;</span> 
-  <span class="code-tag">&lt;broker ...&gt;</span>
-    <span class="code-tag">&lt;plugins&gt;</span>
-      <span class="code-tag">&lt;discardingDLQBrokerPlugin dropAll=<span class="code-quote">"true"</span> dropTemporaryTopics=<span class="code-quote">"true"</span> dropTemporaryQueues=<span class="code-quote">"true"</span> /&gt;</span>
-    <span class="code-tag">&lt;/plugins&gt;</span>
-  <span class="code-tag">&lt;/broker&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans&gt; 
+  &lt;broker ...&gt;
+    &lt;plugins&gt;
+      &lt;discardingDLQBrokerPlugin dropAll="true" dropTemporaryTopics="true" dropTemporaryQueues="true" /&gt;
+    &lt;/plugins&gt;
+  &lt;/broker&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <p>Below is a slightly more complex example: </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;beans&gt;</span> 
-  <span class="code-tag">&lt;broker ...&gt;</span>
-    <span class="code-tag">&lt;plugins&gt;</span>
-      <span class="code-tag">&lt;discardingDLQBrokerPlugin dropOnly=<span class="code-quote">"MY.EXAMPLE.TOPIC.29 MY.EXAMPLE.QUEUE.87"</span> reportInterval=<span class="code-quote">"1000"</span> /&gt;</span>
-    <span class="code-tag">&lt;/plugins&gt;</span>
-  <span class="code-tag">&lt;/broker&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans&gt; 
+  &lt;broker ...&gt;
+    &lt;plugins&gt;
+      &lt;discardingDLQBrokerPlugin dropOnly="MY.EXAMPLE.TOPIC.29 MY.EXAMPLE.QUEUE.87" reportInterval="1000" /&gt;
+    &lt;/plugins&gt;
+  &lt;/broker&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <ul><li>Notice that destination names are space delimited.</li><li>The reportInterval property is used to denote how frequently do we output how many messages we have dropped - use 0 to disable.</li></ul>
@@ -216,15 +216,15 @@ policy.setMaximumRedeliveries(2);
 <p>Below is an even more complex example: </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;beans&gt;</span> 
-  <span class="code-tag">&lt;broker ...&gt;</span>
-    <span class="code-tag">&lt;plugins&gt;</span>
-      <span class="code-tag">&lt;discardingDLQBrokerPlugin dropOnly=<span class="code-quote">"MY.EXAMPLE.TOPIC.[0-9]{3} MY.EXAMPLE.QUEUE.[0-9]{3}"</span> reportInterval=<span class="code-quote">"3000"</span> /&gt;</span>
-    <span class="code-tag">&lt;/plugins&gt;</span>
-  <span class="code-tag">&lt;/broker&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans&gt; 
+  &lt;broker ...&gt;
+    &lt;plugins&gt;
+      &lt;discardingDLQBrokerPlugin dropOnly="MY.EXAMPLE.TOPIC.[0-9]{3} MY.EXAMPLE.QUEUE.[0-9]{3}" reportInterval="3000" /&gt;
+    &lt;/plugins&gt;
+  &lt;/broker&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <ul><li>Notice that the destination names use regular expressions. These match the number 000..999 at the end of each destination name.</li></ul>
@@ -239,28 +239,28 @@ This means that redelivery is limited to
 With broker redelivery, it is possible to have the broker redeliver a message after a delay using a resend. This is implemented by a broker plugin that handles dead letter processing by redelivery via the scheduler. This is useful when total message order is not important and where through put and load distribution among consumers is. With broker redelivery, messages that fail delivery to a given consumer can get immediately re-dispatched.<br clear="none">
 The feature is enabled via xml configuration of the form:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;broker xmlns=<span class="code-quote">"http://activemq.apache.org/schema/core"</span>    schedulerSupport=<span class="code-quote">"true"</span> &gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;broker xmlns="http://activemq.apache.org/schema/core"    schedulerSupport="true" &gt;
         .... 
-        <span class="code-tag">&lt;plugins&gt;</span>
-            <span class="code-tag">&lt;redeliveryPlugin fallbackToDeadLetter=<span class="code-quote">"true"</span> sendToDlqIfMaxRetriesExceeded=<span class="code-quote">"true"</span>&gt;</span>
-                <span class="code-tag">&lt;redeliveryPolicyMap&gt;</span>
-                    <span class="code-tag">&lt;redeliveryPolicyMap&gt;</span>
-                        <span class="code-tag">&lt;setRedeliveryPolicyEntries&gt;</span>
-                            <span class="code-tag"><span class="code-comment">&lt;!-- a destination specific policy --&gt;</span></span>
-                            &lt;redeliveryPolicy queue=<span class="code-quote">"SpecialQueue"</span> maximumRedeliveries=<span class="code-quote">"4"</span>
-redeliveryDelay=<span class="code-quote">"10000"</span> /&gt;
-                        <span class="code-tag">&lt;/setRedeliveryPolicyEntries&gt;</span>
-                        <span class="code-tag"><span class="code-comment">&lt;!-- the fallback policy for all other destinations --&gt;</span></span>
-                        <span class="code-tag">&lt;defaultEntry&gt;</span>
-                            &lt;redeliveryPolicy maximumRedeliveries=<span class="code-quote">"4"</span> initialRedeliveryDelay=<span class="code-quote">"5000"</span>
-redeliveryDelay=<span class="code-quote">"10000"</span> /&gt;
-                        <span class="code-tag">&lt;/defaultEntry&gt;</span>
-                    <span class="code-tag">&lt;/redeliveryPolicyMap&gt;</span>
-                <span class="code-tag">&lt;/redeliveryPolicyMap&gt;</span>
-            <span class="code-tag">&lt;/redeliveryPlugin&gt;</span>
-        <span class="code-tag">&lt;/plugins&gt;</span>
-</pre>
+        &lt;plugins&gt;
+            &lt;redeliveryPlugin fallbackToDeadLetter="true" sendToDlqIfMaxRetriesExceeded="true"&gt;
+                &lt;redeliveryPolicyMap&gt;
+                    &lt;redeliveryPolicyMap&gt;
+                        &lt;redeliveryPolicyEntries&gt;
+                            &lt;!-- a destination specific policy --&gt;
+                            &lt;redeliveryPolicy queue="SpecialQueue" maximumRedeliveries="4"
+redeliveryDelay="10000" /&gt;
+                        &lt;/redeliveryPolicyEntries&gt;
+                        &lt;!-- the fallback policy for all other destinations --&gt;
+                        &lt;defaultEntry&gt;
+                            &lt;redeliveryPolicy maximumRedeliveries="4" initialRedeliveryDelay="5000"
+redeliveryDelay="10000" /&gt;
+                        &lt;/defaultEntry&gt;
+                    &lt;/redeliveryPolicyMap&gt;
+                &lt;/redeliveryPolicyMap&gt;
+            &lt;/redeliveryPlugin&gt;
+        &lt;/plugins&gt;
+]]></script>
 </div></div>
 
 <p>The familiar <a shape="rect" href="redelivery-policy.html" title="Redelivery Policy">Redelivery Policy</a> has been extended to take a matching destination.<br clear="none">
@@ -285,8 +285,8 @@ sendToDlqIfMaxRetriesExceeded controls t
 
 <h3><a shape="rect" name="Navigation-Search"></a>Search</h3>
 
-
-<div>
+<p>
+</p><div>
 <form enctype="application/x-www-form-urlencoded" method="get" action="http://www.google.com/search" style="font-size: 10px;">
 <input type="hidden" name="ie" value="UTF-8">
 <input type="hidden" name="oe" value="UTF-8">

Modified: websites/production/activemq/content/stomp.html
==============================================================================
--- websites/production/activemq/content/stomp.html (original)
+++ websites/production/activemq/content/stomp.html Wed Jul 10 21:21:25 2013
@@ -82,7 +82,7 @@
 
 <p>Its very easy to enable ActiveMQ for Stomp. Just add a connector to the broker using the stomp URL.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;transportConnectors&gt;
    &lt;transportConnector name="stomp" uri="stomp://localhost:61613"/&gt;
 &lt;/transportConnectors&gt;
@@ -90,7 +90,7 @@
 </div></div>
 <p>To see a full example, try <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/example/conf/activemq.xml">this XML</a>. If you save that XML as foo.xml then you can run stomp via the command line as</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 activemq xbean:foo.xml
 ]]></script>
 </div></div>