Apache Camel to detect manually removed files
up vote
2
down vote
favorite
I know it is possible to use Apache Camel for monitoring newly created files and modified files, but is it possible to detect files deleted manually?
I already checked the specification and could not find anything relevant.
apache apache-camel osgi
|
show 1 more comment
up vote
2
down vote
favorite
I know it is possible to use Apache Camel for monitoring newly created files and modified files, but is it possible to detect files deleted manually?
I already checked the specification and could not find anything relevant.
apache apache-camel osgi
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 at 6:20
A use case would be to recursively monitor file changes in the given directory. I know it is not standard feature of Apache Camel, but since we use Camel in our project anyway we also wanted to use it to monitor file changes. Unfortunately, to my knowledge, no Exchange is fired when file is deleted. It is about camel file component indeed.
– Vettel1993
Nov 20 at 8:44
I think the camel file component can not help with this case. What do you want to be triggered by the file changes?
– Christian Schneider
Nov 20 at 12:01
Nothing special, just to execute one method. I just find it odd that Camel does not support such feature.
– Vettel1993
Nov 20 at 16:14
I think it is difficult to implement. Especially if you want to recognize files removed while the system is running and while it is not running. You can request the feature on the camel mailing list or jira.
– Christian Schneider
Nov 21 at 7:50
|
show 1 more comment
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I know it is possible to use Apache Camel for monitoring newly created files and modified files, but is it possible to detect files deleted manually?
I already checked the specification and could not find anything relevant.
apache apache-camel osgi
I know it is possible to use Apache Camel for monitoring newly created files and modified files, but is it possible to detect files deleted manually?
I already checked the specification and could not find anything relevant.
apache apache-camel osgi
apache apache-camel osgi
asked Nov 19 at 12:27
Vettel1993
133
133
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 at 6:20
A use case would be to recursively monitor file changes in the given directory. I know it is not standard feature of Apache Camel, but since we use Camel in our project anyway we also wanted to use it to monitor file changes. Unfortunately, to my knowledge, no Exchange is fired when file is deleted. It is about camel file component indeed.
– Vettel1993
Nov 20 at 8:44
I think the camel file component can not help with this case. What do you want to be triggered by the file changes?
– Christian Schneider
Nov 20 at 12:01
Nothing special, just to execute one method. I just find it odd that Camel does not support such feature.
– Vettel1993
Nov 20 at 16:14
I think it is difficult to implement. Especially if you want to recognize files removed while the system is running and while it is not running. You can request the feature on the camel mailing list or jira.
– Christian Schneider
Nov 21 at 7:50
|
show 1 more comment
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 at 6:20
A use case would be to recursively monitor file changes in the given directory. I know it is not standard feature of Apache Camel, but since we use Camel in our project anyway we also wanted to use it to monitor file changes. Unfortunately, to my knowledge, no Exchange is fired when file is deleted. It is about camel file component indeed.
– Vettel1993
Nov 20 at 8:44
I think the camel file component can not help with this case. What do you want to be triggered by the file changes?
– Christian Schneider
Nov 20 at 12:01
Nothing special, just to execute one method. I just find it odd that Camel does not support such feature.
– Vettel1993
Nov 20 at 16:14
I think it is difficult to implement. Especially if you want to recognize files removed while the system is running and while it is not running. You can request the feature on the camel mailing list or jira.
– Christian Schneider
Nov 21 at 7:50
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 at 6:20
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 at 6:20
A use case would be to recursively monitor file changes in the given directory. I know it is not standard feature of Apache Camel, but since we use Camel in our project anyway we also wanted to use it to monitor file changes. Unfortunately, to my knowledge, no Exchange is fired when file is deleted. It is about camel file component indeed.
– Vettel1993
Nov 20 at 8:44
A use case would be to recursively monitor file changes in the given directory. I know it is not standard feature of Apache Camel, but since we use Camel in our project anyway we also wanted to use it to monitor file changes. Unfortunately, to my knowledge, no Exchange is fired when file is deleted. It is about camel file component indeed.
– Vettel1993
Nov 20 at 8:44
I think the camel file component can not help with this case. What do you want to be triggered by the file changes?
– Christian Schneider
Nov 20 at 12:01
I think the camel file component can not help with this case. What do you want to be triggered by the file changes?
– Christian Schneider
Nov 20 at 12:01
Nothing special, just to execute one method. I just find it odd that Camel does not support such feature.
– Vettel1993
Nov 20 at 16:14
Nothing special, just to execute one method. I just find it odd that Camel does not support such feature.
– Vettel1993
Nov 20 at 16:14
I think it is difficult to implement. Especially if you want to recognize files removed while the system is running and while it is not running. You can request the feature on the camel mailing list or jira.
– Christian Schneider
Nov 21 at 7:50
I think it is difficult to implement. Especially if you want to recognize files removed while the system is running and while it is not running. You can request the feature on the camel mailing list or jira.
– Christian Schneider
Nov 21 at 7:50
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
I have found this question interesting and implemented camel-nio2
component, which is based on NIO.2 WatchService. Feel free to use it.
Docs: https://github.com/bedlaj/camel-nio2
Example:
from("nio2:/tmp/inputPath?events=ENTRY_DELETE")
.process(exchange -> {
FileEvent event = exchange.getIn().getBody(FileEvent.class);
log.info(event.getEventPath()+" removed");
});
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I have found this question interesting and implemented camel-nio2
component, which is based on NIO.2 WatchService. Feel free to use it.
Docs: https://github.com/bedlaj/camel-nio2
Example:
from("nio2:/tmp/inputPath?events=ENTRY_DELETE")
.process(exchange -> {
FileEvent event = exchange.getIn().getBody(FileEvent.class);
log.info(event.getEventPath()+" removed");
});
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
add a comment |
up vote
0
down vote
I have found this question interesting and implemented camel-nio2
component, which is based on NIO.2 WatchService. Feel free to use it.
Docs: https://github.com/bedlaj/camel-nio2
Example:
from("nio2:/tmp/inputPath?events=ENTRY_DELETE")
.process(exchange -> {
FileEvent event = exchange.getIn().getBody(FileEvent.class);
log.info(event.getEventPath()+" removed");
});
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
add a comment |
up vote
0
down vote
up vote
0
down vote
I have found this question interesting and implemented camel-nio2
component, which is based on NIO.2 WatchService. Feel free to use it.
Docs: https://github.com/bedlaj/camel-nio2
Example:
from("nio2:/tmp/inputPath?events=ENTRY_DELETE")
.process(exchange -> {
FileEvent event = exchange.getIn().getBody(FileEvent.class);
log.info(event.getEventPath()+" removed");
});
I have found this question interesting and implemented camel-nio2
component, which is based on NIO.2 WatchService. Feel free to use it.
Docs: https://github.com/bedlaj/camel-nio2
Example:
from("nio2:/tmp/inputPath?events=ENTRY_DELETE")
.process(exchange -> {
FileEvent event = exchange.getIn().getBody(FileEvent.class);
log.info(event.getEventPath()+" removed");
});
edited Nov 25 at 18:04
answered Nov 25 at 14:16
Bedla
1,6762618
1,6762618
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
add a comment |
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 at 13:22
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374643%2fapache-camel-to-detect-manually-removed-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 at 6:20
A use case would be to recursively monitor file changes in the given directory. I know it is not standard feature of Apache Camel, but since we use Camel in our project anyway we also wanted to use it to monitor file changes. Unfortunately, to my knowledge, no Exchange is fired when file is deleted. It is about camel file component indeed.
– Vettel1993
Nov 20 at 8:44
I think the camel file component can not help with this case. What do you want to be triggered by the file changes?
– Christian Schneider
Nov 20 at 12:01
Nothing special, just to execute one method. I just find it odd that Camel does not support such feature.
– Vettel1993
Nov 20 at 16:14
I think it is difficult to implement. Especially if you want to recognize files removed while the system is running and while it is not running. You can request the feature on the camel mailing list or jira.
– Christian Schneider
Nov 21 at 7:50