activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: optimal prefetch setup
Date Tue, 04 Jul 2006 22:40:58 GMT
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

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...

On 7/4/06, Hugo V <> 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:
> Sent from the ActiveMQ - User forum at



View raw message