activemq-users mailing list archives

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

I'm having some trouble with transactions. The problem is multiple consumers
block each other if they spend a long time in a transaction.

What I'm looking to do is send several hundred jobs into a queue. Each job
takes somewhere between a few seconds and 30 minutes to run. Each consumer
reads a job from the queue, processes it, writes the result back to the
queue then commits the transactions. If any problems happen in between it
should rollback and someone else should try the job. Each consumer runs in
it's own VM. It doesn't matter what order the jobs are processed in.

The problem is if one consumer receives a message and starts to process it
all the other consumer block on the receive call until the first one has
done a commit or rollback. This happens even though there are plenty of
messages in the queue. Is there a way around this?

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


Mime
View raw message