Re: Pause/Resume MessageListener using DefaultMessageListenerContainer

2012-08-28 Thread Geoffrey Arnold
To stop: DefaultMessageListenerContainer#stop DefaultMessageListenerContainer#shutdown To restart: DefaultMessageListenerContainer#initialize On Aug 28, 2012, at 4:18 PM, jpcook01 wrote: > Hmmm, > > Thinking about this, if I shut the DefaultMessageListenerContainer do

Re: Pause/Resume MessageListener using DefaultMessageListenerContainer

2012-08-28 Thread jpcook01
Hmmm, Thinking about this, if I shut the DefaultMessageListenerContainer down in the MessageListener then messages will remain the broker and the code to start the listener again will never get invoked? Any other suggestions on this? I don't understand why there isn't some obvious solution to thi

Re: Pause/Resume MessageListener using DefaultMessageListenerContainer

2012-08-27 Thread jpcook01
Thanks, the only problem with the onPause flag option is that when I pause my message listener I want messages to stay on the broker. By the time the code runs in the message listener the message will have been downloaded from the broker particularly as this method is asynchronous. Will have a

Re: Pause/Resume MessageListener using DefaultMessageListenerContainer

2012-08-27 Thread Gaurav Sharma
Hmm, actually, if you do setMessageListener(null) on the DefaultMessageListenerContainer, it will throw an IllegalArgumentException in checkMessageListener(), so, that shouldn't work. The stop(), start(), isRunning() methods do seem like a good option to pause the listener via spring. The other wa