On 9/4/07, corcorda <[EMAIL PROTECTED]> wrote:
>
> I'm having some trouble with transactions. The problem is multiple consumers
> block each other if they spend a long time in a transaction.

Each consumer should be in its own session to avoid them blocking each
other right?


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

Am thinking you're just hitting the default prefetch values...
http://activemq.apache.org/what-is-the-prefetch-limit-for.html

-- 
James
-------
http://macstrac.blogspot.com/

Reply via email to