try {
// try to get the data file
data = con.receive("file://target/enrichdata?move=.done&fileName=" + name, 5000);
} finally {
// stop the consumer as it does not need to poll for files anymore
con.stop();
}
// if we found the data file then process it by sending it to the direct:data endpoint
if (data != null) {
template.send("direct:data", data);