You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jothi <co...@gmail.com> on 2013/07/23 20:58:07 UTC
Camel File Polling Exception
When I read several files from a directory using the file component, should
any exception occur, I can see in the log that Camel tries to read the files
multiple times and constantly writes the exception to the log and eventually
run into a OutOfMemory problem. How to instruct Camel to stop reading the
file in case of an exception and avoid trying it multiple times? I have an
OnException block defined in my route, but that does not seem to take effect
in my case.
Regards,
Joe
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-File-Polling-Exception-tp5736155.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel File Polling Exception
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah see this FAQ
http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html
On Wed, Jul 24, 2013 at 12:39 PM, Bilgin Ibryam <bi...@gmail.com> wrote:
> Hi Joe,
>
> OnException will be called for exceptions happening during routing.
> To catch exception happening before the routing starts for that file,
> you can use ExceptionHandler. See the example here
> http://camel.apache.org/file2.html
>
> Or give a try for consumer.bridgeErrorHandler option
> If that doesn't help, pasting the error message might help
>
> HTH
> Bilgin
>
>
>
> On 23 July 2013 19:58, Jothi <co...@gmail.com> wrote:
>> When I read several files from a directory using the file component, should
>> any exception occur, I can see in the log that Camel tries to read the files
>> multiple times and constantly writes the exception to the log and eventually
>> run into a OutOfMemory problem. How to instruct Camel to stop reading the
>> file in case of an exception and avoid trying it multiple times? I have an
>> OnException block defined in my route, but that does not seem to take effect
>> in my case.
>>
>> Regards,
>> Joe
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Camel-File-Polling-Exception-tp5736155.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: Camel File Polling Exception
Posted by Bilgin Ibryam <bi...@gmail.com>.
Hi Joe,
OnException will be called for exceptions happening during routing.
To catch exception happening before the routing starts for that file,
you can use ExceptionHandler. See the example here
http://camel.apache.org/file2.html
Or give a try for consumer.bridgeErrorHandler option
If that doesn't help, pasting the error message might help
HTH
Bilgin
On 23 July 2013 19:58, Jothi <co...@gmail.com> wrote:
> When I read several files from a directory using the file component, should
> any exception occur, I can see in the log that Camel tries to read the files
> multiple times and constantly writes the exception to the log and eventually
> run into a OutOfMemory problem. How to instruct Camel to stop reading the
> file in case of an exception and avoid trying it multiple times? I have an
> OnException block defined in my route, but that does not seem to take effect
> in my case.
>
> Regards,
> Joe
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-File-Polling-Exception-tp5736155.html
> Sent from the Camel - Users mailing list archive at Nabble.com.