what is the difference between maxMessagesPerTask, prefetch and prefetch limit?
Hi, i am a little confused on what the difference is on all three:
1. prefetch limit: according to this link http://activemq.apache.org/what-is-t...limit-for.html :
ActiveMQ uses a prefetch limit on how many messages can be streamed to a consumer at any point in time
It saids that i can set this per consumer basis, and that i can set this to 0:
2. prefetch: one of the jms:listener-container properties.
Specifying a prefetch limit of zero means the consumer will poll for more messages, one at a time, instead of the message being pushed to the consumer.
But when i set this to 0, i get an exception:
The maximum number of messages to load into a single session. Note that raising this number might lead to starvation of concurrent consumers!
So this brings me to me to the third property maxMessagesPerTask:
Property 'maxMessagesPerTask' threw exception; nested exception is java.lang.IllegalArgumentException: 'maxMessagesPerTask' must not be 0
So what is the differences between the three? and if they are the same - why can't i set the listener container to be 0.
maximum number of messages to process in one task.
To be more specific: i want a consumer to receive one request at a time, and not receive one until finished processing the previous one. what is the best way to do this?