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 messages.
Joe www.ttmsolutions.com 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 > http://activemq.apache.org/exclusive-consumer.html 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: http://www.nabble.com/Exclusive-Lock-on-a-JMS-Queue-tp15606306s2354p15618933.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.