java - How Not Delete message from MQ by throwing Exception using Spring-JMS -
i using spring-jms messagelistenercontainer listen messages. when wrong happens, want throw exception , stop deleting message mq. want use auto_acknowledge session mq. how can achieve this? kind of exception should thrown message not removed mq , resent again?
we have similar requirements in our project. although use ibm wmq give idea of how can achieved.
- read message mq #queue1. read mean extract (read & delete) , not browse message.
- while processing message if error occurs push message other queue #queue2.
- create router brings messages #queue2 #queue1. alternatively, can check , process #queue2 before processing messages on #queue1.
this how replay same message again , again in case of error or exception.
Comments
Post a Comment