Re: Pausing messages consuming

2012-08-21 Thread sk92129
I would like to jump into this thread and ask a related question. I would like to pause message from being consumed selectively, meaning that I would like to pause message #2 and #4. But all messages to be consumed. And then let message #2 and #4 to be consumed later. I think this would create

Re: Pausing messages consuming

2012-07-11 Thread Gary Tully
It is not too importnat; by default, a dispatch to a consumer occurs on its connection thread so it does not block dispatch to other consumers or a message send, so it would be possible to use this technique to selectively block consumers. With asyncDispatch=false, it would not be possible to be

Re: Pausing messages consuming

2012-07-11 Thread mandjeo
I didn't get what you meant by asyncDispatch. I tried with blocking preProcessDispatch and it works. Thanks a lot !!! -- View this message in context: http://activemq.2283324.n4.nabble.com/Pausing-messages-consuming-tp4653866p4653880.html Sent from the ActiveMQ - User mailing list archive at N

Re: Pausing messages consuming

2012-07-11 Thread Gary Tully
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 di

Re: Pausing messages consuming

2012-07-11 Thread mandjeo
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