activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Blocking transactions
Date Tue, 04 Sep 2007 15:21:19 GMT
On 9/4/07, corcorda <> wrote:
> It's not the default prefetch values because I can recreate the problem with
> just 2 consumers and a few jobs.

Thats normally exactly when the prefetch issue hits :)

Make sure you've 10,000 jobs for 2 consumers first  - otherwise set
prefetch to 1.

> The code is very simple. Create a connection using the
> ActiveMQConnectionFactory, call createSession with true and -1 as params.
> Then using this session create a producer that writes jobs and commits.
> On each consumer I do the exact same thing, except I create a consumer and
> call commit after the processing. They run in different VMs.
> What do you mean "Each consumer should be in its own session"? This sounds
> like where I'm going wrong ;)

basically use 1 connection, then each consumer should be created from
its own session (so that it can consume its messages in parallel -
otherwise only one consumer will be active at any point in time).


View raw message