Would you be able to provide the sample code on this example?
On the following page: http://camel.apache.org/splitter.html , there is an excerpt that I have questions about.
++ Excerpt - Start ++
import static org.apache.camel.builder.ExpressionBuilder.beanExpression;
from("direct:streaming")
.split(beanExpression(new MyCustomIteratorFactory(), "iterator"))
.streaming().to("activemq:my.parts")
++ Excerpt - End ++
Can someone provided me with same code for the MyCustomIteratorFactory class?
Basically I have one huge file, that I want to split into many jms messages.
The following is an outline of my current thoughts...
public void configure() throws Exception
{
from( "file://file-item-list/general?initialDelay=1000&delay=5000&delete=true" )
.transacted( "PROPAGATION_REQUIRED" )
.split(ExpressionBuilder.beanExpression(new MyCustomFileChunkIterator(), "iterator")) // split big file of items into smaller chunks
.streaming()
.to("activemq:queue:file-item-sublist-request");
}
Edited by: marks1900 on Dec 16, 2011 7:18 AM