as suggested...multiple exchanges are necessary.  just use a timer to
periodically kickoff the route to check the database, add results to the
exchange, split the results (if desired) and send them along...something
along these lines

from("timer://processResults?fixedRate=true&period=10000")
        .process(new Processor() {
                public void process(Exchange exch) throws Exception {
                        //query the database (mock for now)
                        List results = new ArrayList();
                        for(int i=0; i<10; i++) {
                                results.add((int)(Math.random() * 100));
                        }
                        exch.getIn().setBody(results);
                }
        })
.split().body().to("log:results");



-----
Ben O'Day
IT Consultant -http://benoday.blogspot.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/processor-generating-multiple-messages-tp4288897p4289374.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to