activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ttmdev <>
Subject Re: Exclusive Lock on a JMS Queue
Date Thu, 21 Feb 2008 20:33:47 GMT

I think the exclusive consumer feature should do the trick for you. If you
introduce an exclusive consumer to an existing cluster of non-exclusive
consumers, the exclusive consumer will gain control of the corresponding
destination and the non-exclusives are locked out. When the exclusive
consumer goes away, the non-exclusives resume competing w/one another for


Mark Chaimungkalanont wrote:
> Folks,
> We have a task that means that a single process must have exclusive access
> to the queue for a given period of time. The queue normally would have
> multiple non-exclusive consumers.
> Basically I want semantics that close to the Java synchronization
> semantics, so I acquire a "lock" at which point the queue cannot be
> consumed by any other processes. Then when I finish, release the lock and
> allow other consumers to consume from the queue normally.
> It sounds like this may may be possible through 
> Exclusive Consumers 
> but I'm not sure... Is there any in-built mechanisms for this in ActiveMQ?
> Or any kind of workaround?
> Cheers,
> Mark C

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message