Thank you for the hint, I've checked, I have luck, the component I use has a public process strategy, so I can subclass it.
I'd revert back if a new problem blocks this approach. BTW It suggests that the components should have their default process strategy declared as public and documented ... unless there was a decoupling trick allowing to wrap an unknown/private impl of GenericFileProcessStrategy. Regards Cc. -- Mr. Petr Kužel, Software Engineer Eurofins International Support Services s.à r.l. Val Fleuri 23 L-1526 LUXEMBOURG -----Original Message----- From: Claus Ibsen <claus.ib...@gmail.com> Sent: Friday, August 18, 2023 13:18 To: users@camel.apache.org Subject: Re: How to handle an exception in completion while executing &move= CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally trusted by Eurofins. Do not click on links or open attachments unless you recognise the sender and are certain that the content is safe. Hi Maybe plugin your custom process strategy on the file component and handle the exception there, you can extend the default process strategy. On Wed, Aug 16, 2023 at 3:58 PM Petr Kuzel <petrku...@eurofins.com.invalid> wrote: > Hi Camel community, > > I have a case where a route with a remote file-based endpoint polls > a file message, processes it but in the > GenericFileProcessStrategy<T>.onComplete > state an implementation of &move= throws an exception caused > by missing delete/write permission. > > On next polling the same file is polled again … > > I need to have a possibility to break the loop. My plan, > if I had the exception at my custom handler, is to detect > if the exception is caused by a missing permission > and if so stopping the route, incrementing an error > counter and logging a severe message. > > What error handler / callback is best for handling > exceptions in &move=, and &moveFailed=, > implementations, please? > > (I have a component user hat on my head. If I was > a component author, I’d consider if necessary permission > could be probed earlier and signaling e.g. polling > strategy failed() or so.) > > Best regards > Cc. > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -- Claus Ibsen ----------------- @davsclaus Camel in Action 2: https://www.manning.com/ibsen2