Reputation: 49
I hava file1.jpg,file2.jpg,file3.jpg in DirA. I have file1.json,file2.json,file3.json in DirB
How can I create a apache camel file route such that first route picks file1.jpg from a DirA , processes and pass file1
name to second route so that it can read file1.json and processes.
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
public void configure() {
from("file:///DirA/?noop=true"). bean(MyBean.class,"doSomeThingWithJPG(${file:absolute.path})").
from("file:///DirB/?noop=true&fileName=${file:name}.json").
bean(AnotherBean.class,"doSomeThingWithJSON(${file:absolute.path})") ;
}
})
The second from (file:///)
component is also pointing to file in DirA instead of files in DirB
Upvotes: 0
Views: 746
Reputation: 2937
You could:
Upvotes: 1