hmm, we don't have a good story for that use case atm. But the memory limit on a destination would be one way to stop message production.
Via jmx, you could reduce the memoryLimit, say to 1, on a specific queue and the next message send would block waiting for space. Via jmx it is possible see the pending/inflight counts for consumers and the queue depth of your terminating queue. To terminate a consumer via jmx, you would need to terminate/stop their connection. you can access the connection via the subscription view. For producers, stop/start on their connections is also an option, but if they use failover they will reconnect. I presume you are using non persistent messages, if not, calling broker stop will not result in any message loss. On 2 October 2012 15:11, zackhasit <zackha...@gmail.com> wrote: > Hi, > I want to bring down consumers connected to a specific queue for > maintenance via following steps: > > 1. Block a particular queue from receiving more messages from producers. > (How ?) > 2. Check via Console / programatically that all pending messages have been > processed by consumers. > 3. Now stop the consumers. > > How can I do #1 programatically ? I cant change activemq.xml since that > would require reboot. How to best achieve the above scenario. > > Thanks > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Maintenance-Mode-tp4657353.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://redhat.com http://blog.garytully.com