I was looking for a functionality to stall the consumption of jms messages until a button click from ui. I use activemq for jms broker. And spring to create jms:listeners with a queue declared. However, the requirement is to stall the consumption of messages in onMessage() part of the MessageListener.
I have used receiveTimeout , after I changed the jms:listener in spring to defaultMessageListener as spring bean. Kindly advice.