activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From corcorda <dave.corco...@gmail.com>
Subject Re: Blocking transactions
Date Tue, 04 Sep 2007 15:33:29 GMT

You were completely right. Sorry, I managed to read the prefetch article and
still miss it.

Thank you for your help.


James.Strachan wrote:
> 
> On 9/4/07, corcorda <dave.corcoran@gmail.com> 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 :)
> http://activemq.apache.org/i-do-not-receive-messages-in-my-second-consumer.html
> 
> 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 ;)
> 
> http://activemq.apache.org/how-do-i-use-jms-efficiently.html
> 
> 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).
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Blocking-transactions-tf4378065s2354.html#a12480568
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message