Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- camelContext.addRoute(route1);
- camelContext.start();
- while(0)
- {
- ifComplete(route1)
- break;
- }
- camelContext.stop();
- camelContext.start();
- Thread.sleep(someDeterminedAmountOfTime);
- camelContext.stop();
- CsvDataFormat csv = new CsvDataFormat();
- from(file:/path/to/file/?fileName=fileName&noop=true)
- .split(body().tokenize("/n")).streaming()
- .unmarshall(csv)
- .process(new CsvParserProcess())
- .marshal(csv)
- .to(file:/path/to/new/file/?fileName=out.csv).log("finished").end();
- Main main = new org.apache.camel.spring.javaconfig.Main();
- var springContext = createSpringContext();
- main.setApplicationContext(springContext);
- RouteBuilder route = //create route here
- main.setRouteBuilders(Collections.singletonList(route));
- main.run();//this will block until the route completes
Add Comment
Please, Sign In to add comment