There is an option with ActiveMQ for exclusive consumption like this: queue = new ActiveMQQueue("TEST.QUEUE?consumer.exclusive=true");
For more details, see here: http://activemq.apache.org/exclusive-consumer.html This does not force close an existing consumer on connecting a new one though. -- View this message in context: http://activemq.2283324.n4.nabble.com/I-want-a-queue-allows-only-one-consumer-can-I-do-that-tp4676687p4676693.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.