Discussion:
Apache Camel Question
Piotr Niewinski
2018-11-21 13:13:23 UTC
Permalink
Hello Apache Camel Team,

We are currently working on a project and we have been using Apache Camel
for one year now. Great product.

Recently we wanted to use it for monitoring file changes when user
creates/modifes/removes files. First two options work perfectly fine, but
detecting manually removed files/directories seems to be not supported by
Camel.

The questions is: is it possible to somehow detect manually removed files,
ofc with Apache Camel File component.

PS. What do you think about adding such feature?

Created stackoverflow question:
https://stackoverflow.com/questions/53374643/apache-camel-to-detect-manually-removed-files


Thanks & Best regards,
P. Niewiński


Pozdrawiam
P. Niewiński
FabryProg
2018-11-22 06:23:16 UTC
Permalink
Hello guys

You can use file2 component to scan directory recursively, the output can
be write into a file/db.

You can use a custom query every loop time to changes detection.



Il giorno Mer 21 Nov 2018, 14:39 Piotr Niewinski <
Post by Piotr Niewinski
Hello Apache Camel Team,
We are currently working on a project and we have been using Apache Camel
for one year now. Great product.
Recently we wanted to use it for monitoring file changes when user
creates/modifes/removes files. First two options work perfectly fine, but
detecting manually removed files/directories seems to be not supported by
Camel.
The questions is: is it possible to somehow detect manually removed files,
ofc with Apache Camel File component.
PS. What do you think about adding such feature?
https://stackoverflow.com/questions/53374643/apache-camel-to-detect-manually-removed-files
Thanks & Best regards,
P. Niewiński
Pozdrawiam
P. Niewiński
Claus Ibsen
2018-12-05 10:02:07 UTC
Permalink
Hi

No removal is not supported. The file component is primary designed
for exchange data via files.
Not really for monitoring directory folders. Also the original Java
File API didnt support this either.

You can use the newer Java File API for this.

And its not on the roadmap to add this feature as it would require
significant changes to use the newer
Java file API which also can have slightly different way of operating
depending on the underlying File system.

And its not a common use-case (yet) to react on files being deleted.


On Wed, Nov 21, 2018 at 2:39 PM Piotr Niewinski
Post by Piotr Niewinski
Hello Apache Camel Team,
We are currently working on a project and we have been using Apache Camel
for one year now. Great product.
Recently we wanted to use it for monitoring file changes when user
creates/modifes/removes files. First two options work perfectly fine, but
detecting manually removed files/directories seems to be not supported by
Camel.
The questions is: is it possible to somehow detect manually removed files,
ofc with Apache Camel File component.
PS. What do you think about adding such feature?
https://stackoverflow.com/questions/53374643/apache-camel-to-detect-manually-removed-files
Thanks & Best regards,
P. Niewiński
Pozdrawiam
P. Niewiński
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Continue reading on narkive:
Loading...