I have a listener bean which calls on a session beans method in the MDBs onMessage method. If an exception occurs, such as IllegalStateException (which I throw) or NPE, then JBoss keeps logging the exception, and also keeps retrying to deliver the same message, again spamming the logs, then it sends the message to DLQ, and again calls onMessage which again fails... madness.
Is there any way to stop this? Is there a configuration property for an MDB which tells, if any exceptions occurs in the onMessage (if onMessage doesnt return) retry X times, then fricking stop trying! Is there?