Dear All! I'm working on a project, we are using Apache Camel. I have a question regarding to the error handling.
So, I have a route, which splits a file to elements and tries to send each element to a given endpoint. If something goes wrong, the failing element is saved to an other folder, and the route (which examines that folder) tries to send it again. It's trying to send it infinitely. But I wish I could make it somehow "stop" after a few tries. The first route, which splits the incoming data: from(it's reading from a specified folder) .doTry() .choice() //here are a few "when"s, which describe, where should we send. .endDoTry() .doCatch(Exception.class) .process(errorProcessor) .end(); Ok, it's working. It tries to send the stuff, but when it fails, the "errorProcessor" creates the fragments to an other folder. from(it's reading from the folder, where the errorProcessor writes) .choice() //again, here are a few "when"s .end(); So, I just need to process that folder and try to restrict the number of retries. 1.) onException(Exception.class).maximumRedeliveries(1).redeliveryDelay(0).stop(); This catches the errors, but the maximum redelivery is not working somehow... 2.).errorHandler(defaultErrorHandler().maximumRedeliveries(1)) after the "from" This is also not working... Most probably, I'm missing something. Could you please enlighten me? Thanks for your answer in advance. Br, Ben -- View this message in context: http://camel.465427.n5.nabble.com/Camel-maximumredelivery-policy-How-can-I-make-it-work-tp5762282.html Sent from the Camel - Users mailing list archive at Nabble.com.