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()
.process( generalPreprocessorBean ) // Reads in a smaller list
and outputs a request to process the smaller subset of items
.to("activemq:queue:file-item-sublist-request");
}
* Unfortunately I cannot subscribe to the mailing list as, so if someone can
bounce this request to the mailing list that would be great.
<[email protected]>:
Remote host said: 552 spam score (5.8) exceeded threshold
(FREEMAIL_FORGED_REPLYTO,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,REPTO_QUOTE_YAHOO,SPF_NEUTRAL
) [BODY]
--
View this message in context:
http://camel.465427.n5.nabble.com/split-beanExpression-new-MyCustomIteratorFactory-iterator-tp5078583p5078583.html
Sent from the Camel - Users mailing list archive at Nabble.com.