layout: default_md title: Destination Options title-class: page-title-activemq5 type: activemq5

Features > Destination Features > Destination Options

Background

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.

Consumer Options

Option NameDefault ValueDescription
consumer.dispatchAsynctrueShould the broker dispatch messages asynchronously to the consumer.
consumer.exclusivefalseIs this an Exclusive Consumer.
consumer.maximumPendingMessageLimit0Use to control if messages for non-durable topics are dropped if a slow consumer situation exists.
consumer.noLocalfalseSame as theĀ noLocal flag on a Topic consumer. Exposed here so that it can be used with a queue.
consumer.prefetchSizen/aThe number of message the consumer will prefetch.
consumer.priority0Allows you to configure a Consumer Priority.
consumer.retroactivefalseIs this a Retroactive Consumer.
consumer.selectornullJMS Selector used with the consumer.

Example

queue = new ActiveMQQueue("TEST.QUEUE?consumer.dispatchAsync=false&consumer.prefetchSize=10");
consumer = session.createConsumer(queue);