Signal a rollback from a JMS MessageListener
I've been working with JMS and ActiveMQ. Everything is working wonders. I am not using spring, nor can I. The interface javax.jms.MessageListener has only one method, onMessage . From within a implementation, there is a chance an exception will be thrown. If in fact an exception gets thrown, then I say the message wasn't properly processed and needs to be re-tried. So, I need ActiveMQ to wait for a little while and then, retry. i.e. I need the thrown exception to rollback the JMS transaction. How can I accomplish such a behaviour? Maybe there is some configuration in ActiveMQ I wasn't able to