On 26/03/2008, cmoulliard <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I would like to know if it is possible or could be add as a new feature to
>  split a file containing thousands of records into several block of messages
>  (1 block can contain by example 100 records) using the splitter strategy ?

The current Splitter actually supports - provided you have some
expression that can take the File and generate an iterator over it to
create the individual message bodies you want to send.

So you could do something like...

  from("file:///c:/temp?noop=true)").
    splitter().method("myBean", "split").
    to("activemq:someQueue")

Then register "myBean" with a split method...

class SomeBean {
  public Iterator split(File file) {
     /// figure out how to split this file into rows...
  }
}

How were you planning on parsing/splitting the file?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to