camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kripalani, Raul" <>
Subject Re: Directory synchronization with Camel
Date Wed, 19 Oct 2011 08:33:55 GMT
Hi Radomic,

You may want to try the noop=true attribute that Ioannis mentioned along
with a custom GenericFileFilter which keeps a mapping (e.g. Hashtable)
between file names and their "last modified" date, or an MD5 hash of the

When scanning each file, compare the current value against the stored value,
and if it differs, you can accept the file an update the entry in the
Hashtable. Else, reject the file.


On 19 October 2011 08:22, Radomir Kadlec <> wrote:

> Hello,
> thanks for the tip.
> But the problem is not that the files will be moved or deleted.
> No, Camel leave them in the directory and this is right.
> But when I replace some *file with newer version* (the same file with newer
> date and time), Camel file component does not recognize this and does
> nothing.
> I debuged it and I see here only one solution: *To add the file date and
> time to the key* for the idempotent repository. The key contains filename
> only and this is not sufficient.
> See GenericFileConsumer.isValidFile, where file.getAbsoluteFilePath() is
> used to search in the repository.
> *Is it possible to change the key building in GenericFileConsumer* so, that
> the key contains the file date and time too?
> The best way to do this is to create a new protected function for key
> building. So can any subclass overwrite the key building functionality in
> its way.
> Thanks
> Radomir
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

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