Hi, I am using the camel file component for an inbox processing software.
Files are read, parsed, enriched with metadata from an external service and finally moved to an output folder. When there is an exception with parsing the files, "moveFailed" is moving the files to an error folder. When there is an exception when calling the external service in a subroutine (from(direct)), I do not want the file to be moved to the error folder. Camel shall shutdown and leave the file where it is. I tried with "onException" and a dedicated Processor where I call "exchange.getContext().shutdown()", but this will finally executed the callback an rollback to "moveFailed" The only way I got it working was with "System.exit(-1)". This does not seem very clean to me. Do you know a way to intercept the "onCompletion onFailure" of the file component? Thank you! Kind regards Alexander Lex