blob: 5eaba8a2834b8bb4987b618d270b44abdcae53de [file] [log] [blame]
<div class="wiki-content maincontent"><h3>Background</h3><p>Destination Options are a way to provide extended configuration options to a JMS consumer without having to extend the JMS API. The options are encoded using URL query syntax in the destination name that the consumer is created on.</p><h3>Consumer Options</h3><table><tbody><tr><th colspan="1" rowspan="1"><p>Option Name</p></th><th colspan="1" rowspan="1"><p>Default Value</p></th><th colspan="1" rowspan="1"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.dispatchAsync</code></p></td><td colspan="1" rowspan="1"><p><code>true</code></p></td><td colspan="1" rowspan="1"><p>Should the broker <link><page ri:content-title="Consumer Dispatch Async"></page><plain-text-link-body>dispatch messages asynchronously</plain-text-link-body></link> to the consumer.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.exclusive</code></p></td><td colspan="1" rowspan="1"><p><code>false</code></p></td><td colspan="1" rowspan="1"><p>Is this an <link><page ri:content-title="Exclusive Consumer"></page></link>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.maximumPendingMessageLimit</code></p></td><td colspan="1" rowspan="1"><p><code>0</code></p></td><td colspan="1" rowspan="1"><p>Use to control if messages for non-durable topics are dropped if a <link><page ri:content-title="Slow Consumer Handling"></page><plain-text-link-body>slow consumer</plain-text-link-body></link> situation exists.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.noLocal</code></p></td><td colspan="1" rowspan="1"><p><code>false</code></p></td><td colspan="1" rowspan="1"><p>Same as the&#160;<strong><code>noLocal</code></strong> flag on a Topic consumer. Exposed here so that it can be used with a queue.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.prefetchSize</code></p></td><td colspan="1" rowspan="1"><p><code>n/a</code></p></td><td colspan="1" rowspan="1"><p>The number of message the consumer will <link><page ri:content-title="What is the Prefetch Limit For?"></page><plain-text-link-body>prefetch</plain-text-link-body></link>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.priority</code></p></td><td colspan="1" rowspan="1"><p><code>0</code></p></td><td colspan="1" rowspan="1"><p>Allows you to configure a <link><page ri:content-title="Consumer Priority"></page></link>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.retroactive</code></p></td><td colspan="1" rowspan="1"><p><code>false</code></p></td><td colspan="1" rowspan="1"><p>Is this a <link><page ri:content-title="Retroactive Consumer"></page></link>.</p></td></tr><tr><td colspan="1" rowspan="1"><p><code>consumer.selector</code></p></td><td colspan="1" rowspan="1"><p><code>null</code></p></td><td colspan="1" rowspan="1"><p>JMS Selector used with the consumer.</p></td></tr></tbody></table><h3>Example</h3><structured-macro ac:macro-id="3ee1935a-0d33-41b2-b125-7b032eae301b" ac:name="code" ac:schema-version="1"><parameter ac:name="">java</parameter><plain-text-body>queue = new ActiveMQQueue("TEST.QUEUE?consumer.dispatchAsync=false&amp;consumer.prefetchSize=10");
consumer = session.createConsumer(queue);
</plain-text-body></structured-macro></div>