I'm confused on how to deal with failures. If any part of my logic in the processMsg (below) fails (external resources not available, wrong parameters passed in queueMsg, etc.) then I do not want the message to be dequeued. I realize, however, that the message will then just fire again and keep failing. So, how do I deal with failures? If the message in the queueMsg is important and I don't want to lose its data, how can I prevent that from happening? Perhaps I could bundle the queueMsg into a failures area on my machine and analyze them programmatically or by hand at a later time.
@Async *public* *void* processMsg(QueueMessage queueMsg) { // check if database available, if not, put this message back on queue or store somewhere } Cheers!