Camel csv bindy, splitter and aggregator

samples

		from(sourceFtpUrl)//probably do archiving here??
			.transacted("PROPAGATION_REQUIRED")
				.onCompletion()
				.onCompleteOnly()
				.log(LoggingLevel.INFO,
						getClass().getName(),
						"this part is consuming one csv file of many rows of records")
				.end()
				.unmarshal(bindy)//this is part to unmarshal to list of objects
				.split(body(), new SomeAggregator())//split the list, pass each bean to someBeanToProcessEachObject, then Aggregarte using SomeAggregator to aggregate each new object into old list
					.beanRef("someBeanToProcessEachObject", "process")
				.end()
				.split(body()).parallelProcessing()
						.beanRef("someProcess", "process")//Split again, which now each object is an already aggregrated object
				.end()
				.log(LoggingLevel.INFO, getClass().getName(),
						"All Processed");
Advertisements

Author: lwpro2

Java J2EE professional

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s