camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajesh_h <rajes...@hotmail.com>
Subject Re: CamelContext resume does not reactivate the route
Date Mon, 11 Mar 2013 04:29:41 GMT
Here is the route-psp1

// Processing one csv file at a time
from(fromLocation).routeId("route-psp1")
	.choice()
	        .when(simple("${file:ext} == 'csv'")).to("direct:csv")
		.otherwise().log("Ignoring unknown file ${file:name}");

// And here is route-psp2, which streams 1000 lines at a time and processes
them.
from("direct:csv").routeId("route-psp2")
			.process(new LogFileInitializer())				// Initialize the File Appender
			.log("Processing file ${file:name}")
			.beanRef("pspWorkingContext", "initialize")		// Initialize the working
context			
			.split().tokenize("\n", 1000).streaming()		// Stream 1000 lines at a time
				.log("Stream the next 1000 lines")
				.to("direct:thousands")
			.end()
			.log("Processed file ${file:name}")				// Done processing the file.
			.choice()
				.when().method("pspWorkingContext", "stopRoute") 	// If the route was
stopped, move to retry location.
					.log("Moving file ${file:name} to retry location as r-${file:name}")
					.to(getRetryEndPoint()).end()
			.beanRef("pspWorkingContext", "done")
		.to(getToEndPoint());





--
View this message in context: http://camel.465427.n5.nabble.com/CamelContext-resume-does-not-reactivate-the-route-tp5728862p5728913.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message