prefetch==0 should be the answer here. Do you have a simple test case you
can share?

2010/1/19 Christoph Kutzinski <ku...@gmx.de>

> Hi,
>
> let me first describe my use-case as it is probably a little bit different
> from the usual JMS use case:
>
> We have a single process which fills a JMS queue from a pool of available
> items (say we have 50 items total).
> The we have n consumers (lets say 2) which read the items from the queue in
> a synchronous way (i.e. Spring JmsTemplate#receive).
> This goes like so:
> - consumer A fetches 5 items
> - consumer B fetches 20 items
> - consumer A fetches 5 items
> and so on.
>
> The problem we have now is that we are not able to fetch all items from the
> queue - e.g. if there are still 10 items left in the queue and I want to get
> 10, I only get 5 or so.
>
> I've already found the prefetchSize configuration and set it to 0 (also
> tried 1), but still the same problem.
> The problem seems to be that each consumer has an internal 'dispatched
> queue' which already has some entries and consumer A has no possibility to
> access the dispatched queue of consumer B.
>
> For example the web console looks like this:
> Consumer A; Enqueues 10; Dequeues 5; Dispatched 10; Dispatched Queue 5;
> Prefetch 0; Max Pending 0
>
> Consumer B; Enqueues 20; Dequeues 10; Dispatched 20; Dispatched Queue 10;
> Prefetch 0; Max Pending 0
>
> In this case there would be e.g. still 15 items total in the queue, but
> with consumer A I would onyl be able to get 5 items and with consumer B only
> 10 items.
>
> I've tried various configuration options which I found in the ActiveMQ docu
> (dispatchAsync, alwaysSessionAsync, sendAsync, ...), but none seemed to
> help.
>
> Can anyone help? Does anyone know how to configure/disable this dispatched
> queue?
>
>
> thanks
> Christoph
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Reply via email to