I'm using the camel file component to poll files from a directory. Before I can handle a file some conditions have to be satisfied, if not camel should skip the file without deleting/moving it and go to the next one.
To do this I use this:
public InputStream myMethod(@Body InputStream is, @Headers .....) {
if( !checkPrerequisites )
throw new MyRuntimeException("conditions not satisfied yet");
So I'm wondering if there is another way to archive the desired behaviour.