The prefetch property is related to consumers; it shouldn't really matter if a consumer is on the same connection or not. Though 1 session only dispatches messages for any consumers in one single thread, so consumers have to be using different sessions to have any concurrency.
How many messages are on the queue? Its quite common for consumers to eagerly pull their entire prefetch window in aggressively (which under low message volumes can lead to unfair distribution). To go for fairer load balancing rather than high performance you can use the round robin delivery policy... http://incubator.apache.org/activemq/per-destination-policies.html http://incubator.apache.org/activemq/how-do-i-change-dispatch-policy.html On 7/4/06, Hugo V <[EMAIL PROTECTED]> wrote:
Hello We need some insight how to properly use of the ?prefetch? property. This is my setup: 1 Queue, 5 consumers on 5 different JmsSession all sharing the same JmsConnection. Single JVM, each consumer is in a Thread. As written in the FAQ, with the prefetch to 1000, only one consumer is actually receiving messages. On the other hand, if I set the prefetch to 1, All my Thread are now processing but I get medium delivery performances. To take advantage of the prefetch , I had to create a separate JmsConnection for each consumer. But this configuration takes more resources (double the number of Threads). Is the prefetch property related to the JmsConnection or the JmsSession ? Is having more than one JmsConnection disable the prefetch propery ? Thank you -- View this message in context: http://www.nabble.com/optimal-prefetch-setup-tf1891403.html#a5171934 Sent from the ActiveMQ - User forum at Nabble.com.
-- James ------- http://radio.weblogs.com/0112098/
