onMessage() of AbstractJMSHibernateSearchController could throw a RuntimeException in its try clause which would then propagated to the caller of the method. This is wrong from a JMS spec perspective which says in 8.7. Receiving messages asynchronously:
It is possible for a listener to throw a RuntimeException; however, this is considered a client programming error. Well behaved listeners should catch such exceptions and attempt to divert messages causing them to some form of application-specific ‘unprocessable message’ destination.
The result of a listener throwing a RuntimeException depends on the session’s acknowledgment mode.
The question is what the best approach is to handle this? Potentially we are going to loose a whole bunch of index updated. What else except logging them can we do?