blob: 2186bdb6a877c0e3135030da297fcb6a3c2a29c6 [file] [log] [blame]
<div class="wiki-content maincontent"><h3>Background</h3><p>Destination Options are a way to provide extended configuration options to a NMS consumer without having to extend the NMS 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>consumer.prefetchSize</p></td><td colspan="1" rowspan="1"><p>variable</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>.&#160; <strong>Removed in NMS.ActiveMQ v1.7.0 use the PrefetchPolicy isntead.</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p>consumer.maximumPendingMessageLimit</p></td><td colspan="1" rowspan="1"><p>0</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>consumer.noLocal</p></td><td colspan="1" rowspan="1"><p>false</p></td><td colspan="1" rowspan="1"><p>Same as the noLocal 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>consumer.dispatchAsync</p></td><td colspan="1" rowspan="1"><p>true</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>consumer.retroactive</p></td><td colspan="1" rowspan="1"><p>false</p></td><td colspan="1" rowspan="1"><p>Is this a <link><page ri:content-title="Retroactive Consumer"></page><plain-text-link-body>Retroactive Consumer</plain-text-link-body></link>.</p></td></tr><tr><td colspan="1" rowspan="1"><p>consumer.selector</p></td><td colspan="1" rowspan="1"><p>null</p></td><td colspan="1" rowspan="1"><p>NMS Selector used with the consumer.</p></td></tr><tr><td colspan="1" rowspan="1"><p>consumer.exclusive</p></td><td colspan="1" rowspan="1"><p>false</p></td><td colspan="1" rowspan="1"><p>Is this an <link><page ri:content-title="Exclusive Consumer"></page><plain-text-link-body>Exclusive Consumer</plain-text-link-body></link>.</p></td></tr><tr><td colspan="1" rowspan="1"><p>consumer.priority</p></td><td colspan="1" rowspan="1"><p>0</p></td><td colspan="1" rowspan="1"><p>Allows you to configure a <link><page ri:content-title="Consumer Priority"></page><plain-text-link-body>Consumer Priority</plain-text-link-body></link>.</p></td></tr></tbody></table><h3>Example</h3><structured-macro ac:macro-id="d40cc8cd-2b72-4323-85a1-aabddd8c3228" ac:name="code" ac:schema-version="1"><parameter ac:name="">java</parameter><plain-text-body>var queue = session.GetQueue("TEST.QUEUE?consumer.dispatchAsync=false&amp;consumer.prefetchSize=10");
var consumer = session.CreateConsumer(queue);
</plain-text-body></structured-macro></div>