[ 
https://issues.apache.org/jira/browse/CAMEL-17443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17469935#comment-17469935
 ] 

Yasser Zamani commented on CAMEL-17443:
---------------------------------------

Thanks [~davsclaus]! It's not about valid/invalid files. That minAgePredicate 
is about postponing the file until it satisfies our specified min age. So 
filtering won't help. I'd tried it. Camel internally mark that file as 
processed and won't poll it again at all.

As said {{.rollback()}} works as I described in description. Because it throws 
exception. The problem is it also logs warning messages which I wished I was 
able to avoid with .markRollbackOnly().

> .markRollbackOnly() doesn't abort exchange
> ------------------------------------------
>
>                 Key: CAMEL-17443
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17443
>             Project: Camel
>          Issue Type: Wish
>    Affects Versions: 3.14.0
>            Reporter: Yasser Zamani
>            Priority: Major
>
> {code:java}
> from("file:./target/source?move=../archive")
> .transacted()
> .choice().when(minAgePredicate).markRollbackOnly()
> .otherwise()
> ....
> {code}
> moves the consumed file to the archive folder even when it's marked to 
> rollback!
> When I replace {{.markRollbackOnly()}} with {{.rollback()}}, it works as 
> expected i.e. it doesn't move the file to the archive folder and polls it 
> again and again until {{minAgePredicate}} satisfied. But the problem is that 
> it logs a lot of warnings i.e. in each poll it warns about the rollback.
> As per docs, I wished I could ask Camel to just rollback and abort/stop 
> exchange *silently* with *.markRollbackOnly()*.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to