Hi,

Accidently I realized the behaviour of the FileConsumer [1] which seems to
*just only* log an encountered exception while consuming.

Per default it seems that the FileConsumer (as a polling one) has
LoggingExceptionHandler wired into it which get's kicked through
getExceptionHandler().handleException(xyz) in the case of an encountered
exception which logs the error at the ERROR level. And then the message
routing *continues* further. To me this behaviour is as if there's an
onException() clause on the route like:

onException(java.lang.Exception.class).handled(true).continued(true);

Just as a use case imagine of a simple billing-system having three routes.
One route produces the monthly bills and dumps them into a really really big
xml-file, the other route reads that big xml-file (through FileConsumer),
splits the bill-entries and writes the splitted entries into the file
system. The third route on it's turn reads bill files and sends them to the
consumers by mail. Now with that exception swalling behaviour of
FileConsumer in place, if renaming/moving/deleting of that big xml-file by
the second route fails in between, for example just because of the possible:

- disk out of space issue
- maximum unix quota has been already reached issue

Then the third route would wait forever and there will be not even an
invocation of possible onException clause (if any) at all. So the operation
guys will not realize any problem (not even through JMX or whatnot)...So
happy free-service for the customers...

How do you see this? Am I missing something? 

[1]
http://camel.465427.n5.nabble.com/Riding-on-org-apache-camel-language-TokenPairPredicateTest-td5041981.html

Babak

--
View this message in context: 
http://camel.465427.n5.nabble.com/Does-the-FileConsumer-swallow-an-exception-by-just-only-logging-it-tp5054954p5054954.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to