you could intercept org.apache.activemq.broker.Broker#preProcessDispatch in your plugin and block. This will stop all message dispatch from the broker as this method is called before every message dispatch by the transport. With asyncDispatch (the default) this will end up blocking the consumers dispatch thread.
On 11 July 2012 10:20, mandjeo <mand...@gmail.com> wrote: > I also tried setting the Selector for the consumer to something that will not > be valid for any of the messages and than when I want to restart consuming > setting it back, but this doesn't work. Messages keep getting consumed, it's > like setting the selector after adding the consumer doesn't make any > effect... > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Pausing-messages-consuming-tp4653866p4653867.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://fusesource.com http://blog.garytully.com