Hi Yeah but converting to a type with generics is hard due type erasure. So Camel has a hard time to match that Iterator<Item> is what you want, and not Iterator<FooBar> in case something like that is added in the future.
On Sat, Nov 9, 2013 at 10:42 AM, brenuart <bertrand.renu...@itma.lu> wrote: > Claus Ibsen-2 wrote >> #1 is a fine option as you need to use the splitter in streaming mode >> to split 1 message into N messages. > > Indeed, you are right - this is how it should be seen: a first message is > received that holds the file, it is then split into smaller messages whose > content is transformed. > > Ok - I can live with that ;-) > > > Claus Ibsen-2 wrote >> In #2 you just convert the body from one type to another, its still 1 >> message from Camel point of view. And only 1 message send to the AMQ. > > Yes, but what if I do: > > from("file:incoming") > .convertBodyTo(Iterator<Item>) > .split(body()) > .streaming() > .to("activemq:items") > > It is basically the same as #1 except that Transformation and Split are now > handled by two separated components. > All comes down to the basic question of how/where should I handle the > unmarshalling... > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Read-and-process-very-large-files-tp5742889p5742919.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen