I am writting what would be the equivalent of an error queue retry ultility
for a camel application that moves messages between different jms queues.  I
am looking for it to contain several features:

1) Only process messages that are older than when the route was created so
messages that are sent back to the error queue aren't infinitely retried
- I accomplish this by checking the JMSTimestamp header on the exchange and
then forcing a route shutdown and throwing an exception to ensure the
message remains on the queue with CLIENT_ACKNOWLEDGE mode.

2) Stop reading from the queue when there are no messages remaining.  
-I accomplish this by generating a route on the queue and adding that route
Id to a list in a bean.  Everytime that route runs it updates a timestamp in
the bean to make sure it is still processing.  Another route off a quartz
timer runs every few seconds to find any timestamps that are past a timeout
interval and stops those routes.


What I am trying to do is remove the manual exception throwing for keeping
the jms message on the queue because I don't want this application to be
throwing an actual error over a standard feature that it needs.  Is there
anyway to end processing on an exchange and not call the jms.acknowledge()
method behind the scenes?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Jms-Client-Acknowledgement-Forced-failure-options-tp5752737.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to