Author: buildbot
Date: Mon May 9 22:21:58 2016
New Revision: 987852
Log:
Production update by buildbot for activemq
Modified:
websites/production/activemq/content/cache/main.pageCache
websites/production/activemq/content/dispatch-policies.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 Mon May 9
22:21:58 2016
@@ -82,9 +82,9 @@
<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 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 <policyEntry /> 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 behaviour) 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 <policyEntry /> 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;"><policyEntry queue=">"
strictOrderDispatch="false" /> </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 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">
+</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><p>From version 5.14.0 -
the strictOrderDispatch=true option will ensure strict order for
redispatched messages when there is a single consumer. </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.Priority
NetworkDispatchPolicy 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="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"><destinationPolicy>
<policyMap>
<policyEntries>