I know this sounds as heard 1000 times, but I don't think so and I could not really find a solution:
With common ejb I can use acknowledge mode to acknowledge() message manually. If I don't do it is redelivered. I did this in the past and it worked well.
Using Spring JMS I have the problem that it seems I either can set redelivery to be processed only if an exception is thrown or not at all.
How to realize it as with ejb?
My problem is: If the message is acknowledged I DON'T want it to be redelivered at all, even if an exception occurs.
We can use spring framework's DefaultMessageListenerContainer for your requirement.
Please find below documentation from Spring:
http://docs.spring.io/spring/docs/2.5.x/reference/jms.html#jms-asynchronousMessageReception
The following is the code snippet in which I have added acknowledge() method on the method.
JMS Listener Class:
spring-jms-config.xml