Destination options)
The queue option is a feature added to the consumer outside the JMS specification. You can add multiple options by using URL-like syntax after the queue name.
| Option |
Default Value |
Description |
| Consumer. prefetchsize |
Indefinite |
For the maximum number of unconfirmed messages held by consumer, see prefetch. |
| Consumer. maximumpendingmessagelimit |
0 |
Controls the maximum number of messages discarded when a non-persistent topic consumes slow consumer. |
| Consumer. nolocal |
False |
|
| Consumer. dispatchasync |
True |
For information about asynchronous distribution, see dispatch messages asynchronously. |
| Consumer. Consumer active |
False |
Whether to backtrack consumer active consumer. |
| Consumer. Selector |
Null |
JMS selector. |
| Consumer. Exclusive |
False |
Exclusive consumer. |
| Consumer. Priority |
0 |
Configure the consumer priority. |
Configuration example:
Queue = new activemqqueue ("test. queue? Consumer. dispatchasync = false & Consumer. prefetchsize = 10 ");
Consumer = session. createconsumer (Queue );