Apache Camel to detect manually removed files
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
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 '18 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 '18 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 '18 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 '18 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 '18 at 7:50
|
show 1 more comment
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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 at 7:50
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 '18 at 6:20
Can you explain moe about the use case? Is this about the camel file component?
– Christian Schneider
Nov 20 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 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 '18 at 7:50
|
show 1 more comment
1 Answer
1
active
oldest
votes
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 '18 at 13:22
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 '18 at 13:22
add a comment |
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 '18 at 13:22
add a comment |
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 '18 at 18:04
answered Nov 25 '18 at 14:16


Bedla
1,6912618
1,6912618
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 '18 at 13:22
add a comment |
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 '18 at 13:22
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 '18 at 13:22
Thanks. We ended up implementing WatchService as well. Seems to be best solution so far.
– Vettel1993
Nov 26 '18 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 '18 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 '18 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 '18 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 '18 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 '18 at 7:50