Hi

Are you lucky enough to use 2.9?
If so just set the option sendEmptyMessageWhenIdle=true, see [1].
Else you need a polling strategy.

[1] https://issues.apache.org/jira/browse/CAMEL-4508

Taariq

On 17 Nov 2011, at 7:47 PM, szaruba <stefan.zar...@student.tgm.ac.at> wrote:

> Hi everybody!
> 
> After we implemented our routes based on ideas, described in the forum post
> http://camel.465427.n5.nabble.com/How-to-grab-a-only-one-file-with-camel-td4930104.html,
> we got a big problem. Basically we have 2 Camel routes, one of these routes
> is always asking (polling) for a single file.
> 
> Our route looks like this:
> 
> from("Path and filename to current file to grab")
> .routeId("batch")
> .to("file:data/outbox/")
> .convertBodyTo(String.class)
> .process(......);
> 
> We got a list of files, and we have to transfer every of these files. Every
> file gets processed, but if there is a file in the list, that doesn’t exist
> in our input directory, the route is polling infinite for this file. Output
> of the consumer (this goes infinite): 
> 
> "Took 0.0145 seconds to poll .............."
> 
> If this happens we want to throw an exception or generate a syslog message,
> but the problem is, that we don't know how to implement such. Sure we can
> watch after the Log4j output, but this doesn't seem to be a convenient
> solution. If anybody has any hints, how to monitor, that a file was missing
> and a route is polling for infinite, please answer to this post. Thanks in
> advance. 
> 
> Greetings, Lukas
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-2-catch-infinite-polling-on-a-single-file-tp5001923p5001923.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to