I am using spring-jms with active mq.
I have an ErrorHandler customizer that gets a callback every time a jms message delivery failure fails, that is, the method that processes the message throws an exception instead of returning gracefully.
However, my jms are set up to retry several times until the jms delivery is finally completed. And my callback is notified of all failures.
What I want is a listener who receives a notification only when all retries finally fail. The motivation is to bring the problem to the attention of the administrator. But I do not want false notifications in the admin console.
<bean abstract="true" id="abstractDestinationListener" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="jmsFactory" /> <property name="errorHandler" ref="destinationErrorHandler"/> <property name="sessionTransacted" value="true"/> </bean>
source share