camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gvvenkat <>
Subject Java DSL vs Spring Dsl with Splitter and Aggregator
Date Tue, 05 Feb 2013 22:28:51 GMT
I am trying convert one of the JAVA DSL into Spring DSL. Java DSL reads the
file and applies the processor correctly and finally invokes the aggregator
and writes into the destination location ( also removes from the source
location as required). 

But Below equivalent (in opinion Spring DSL :) ) , does not invoke the
aggregator and never writes the destination file and does not remove the
source file so starts looping...One other important thing I should mention
is , I ambootstraping the applicationcontext xml using
org.apache.camel.spring.Main class.

Here is both JAVA DSL and Spring DSL.. Can some expert help me in
identifying the issue why Spring DSL behaviour is not the same as Java DSL.

 Spring Dsl 
 <camelContext xmlns="">		

         from uri="file:F:/EbcConversion/Data/inbox/?
         <split streaming="true"  >
            <method bean="byteSplitterBean" method="splitBody"/>
            <process ref="decoder" />       
            <to uri="direct:start" />   			
         </split >

	<from uri="direct:start" />
		<aggregate strategyRef="aggregationStrategy"
			completionTimeout="1500" completionSize="750" >
		<to uri="mock:aggregated"/> 

Java DSL 
split().method("mySplitterBean", "testBody").streaming().
process( new NewDecoder()).
		new StringBodyAggregator()).completionSize(750)

Thanks a lot.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message