camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Wulff <>
Subject AW: file input with tail -f behaviour
Date Tue, 28 Mar 2017 12:35:51 GMT
Even when there is no change in the file it starts parsing it from the first line every second:

<from uri="stream:file?fileName=sample.csv&amp;scanStream=true&amp;scanStreamDelay=1000&amp;retry=true"

I use Camel version 2.16.3.

Maybe an option in Camel could be to use the Apache Commons IO Tailer implementation similar
to Apache Karaf Decanter here:



Von: Claus Ibsen <>
Gesendet: Montag, 27. März 2017 11:13:58
Betreff: Re: file input with tail -f behaviour

What do you mean by start from beginning?

It ought to read line by line when the file is appended. And if a new
file is created it starts from top again.
If you shutdown Camel, it does not remember where it was last time,
and start all over again

On Fri, Mar 24, 2017 at 11:28 AM, Oliver Wulff <> wrote:
> Hi there
> I've tried to use the stream input component to listen on changes within a file to process
the lines one by one.
> <from uri="stream:file?fileName=sample.csv&amp;scanStream=true&amp;scanStreamDelay=1000&amp;retry=true"
> But I noticed it always starts from the beginning. Is there an option in Camel to have
"tail -f" behaviour to trigger my route?
> Thanks
> Oli

Claus Ibsen
----------------- @davsclaus
Claus Ibsen (@davsclaus) riding the Apache Camel<>
A blog about Apache Camel, by Claus Ibsen, the leading contributor, and author of the Camel
in Action book.

Camel in Action 2:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message