You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jeff <jf...@gmail.com> on 2013/03/04 19:36:05 UTC

Re: Opposite of split

Thks Claus for the answer, but I have not found the simplest way to do a
simple:  

		from("file://input")
				.split()
				.tokenize("\n")
                                .unmarshal
                                .bindy(BindyType.Csv, AED.class)
                                .bean(AEDProcessor.class, "processTicket")
                                .marshal()
                                .bindy(BindyType.Csv, AEDResult.class)
                                [?????]
                                .to("file://output?fileName=${file:name}")

The only way I found is to do a :
                               
.to("file://output?fileName=${file:name}&fileExist=Append")

But it is too slow ! 





--
View this message in context: http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Opposite of split

Posted by Jean Francois LE BESCONT <jf...@gmail.com>.
Thks claus !

I have made a little benkmark between aggregate :

                .aggregate(header(Exchange.FILE_NAME_ONLY),
                                new
BodyInAggregatingStrategy()).completionSize(750)
                                                .completionTimeout(1500)
.to("file://" + propertiesKeys.AED_OUTPUT_DIR +
"?fileName=${file:name}&fileExist=Append")


End recipient list :

.recipientList(
simple("stream:file?fileName="
+ propertiesKeys.AED_OUTPUT_DIR
+ "${file:onlyname}&encoding=UTF-8"))

Aggregate method looks faster for the same file. Any interest to use
recipient in place of aggregate ?

   method  START END EXEC TIME  recipientList 13:23:15 13:24:11 00:00:56
aggre 13:30:55 13:31:39 00:00:44



2013/3/5 Claus Ibsen <cl...@gmail.com>

> On Tue, Mar 5, 2013 at 11:03 AM, Jean Francois LE BESCONT
> <jf...@gmail.com> wrote:
> > Thanks for the link, but dynamic URI works great in classic to file :
> >
> > .to("file://" + OUT_DIR + "?fileName=${file:name}&fileExist=Append")
> >
> > But in my case :
> > .from
> > .split().tokenize("\n").streaming()
> > .unmarsh
> > .bindy
> > .bean
> > .marshal
> > .bindy
> > .to("stream:file?fileName="+ OUT_DIR +"OUT.csv&encoding=UTF-8")
> >
> > Write in a  file renamed " ${file "
> >
>
> You should use recipient list as "dynamic to" in Camel. As we say on the
> FAQ.
>
>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2013/3/5 Claus Ibsen <cl...@gmail.com>
> >
> >> On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT
> >> <jf...@gmail.com> wrote:
> >> > Christian, The stream file mecanism is awsome !
> >> > But I have not found how to manage dynamic name with it .... something
> >> like
> >> > :
> >> >   .to("stream:file?fileName=file.csv&encoding=UTF-8")
> >> > works  but I would like to do :
> >> >   .to("stream:file?fileName=${file:name}&encoding=UTF-8")
> >> >
> >>
> >> Hi
> >>
> >> See this FAQ
> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>
> >> >
> >> >
> >> >
> >> > 2013/3/5 Jean Francois LE BESCONT <jf...@gmail.com>
> >> >
> >> >> Thks Ryan your like is very helpfull ! It make the trick.
> >> >>
> >> >> Thks Christian too, I now have a solution but I while check this code
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> 2013/3/5 Christian Müller <ch...@gmail.com>
> >> >>
> >> >>> Sorry, I mean this one:
> >> >>>
> >>
> https://github.com/muellerc/apachecon-na-2013/tree/master/file-component
> >> >>>
> >> >>> Sent from a mobile device
> >> >>> Am 04.03.2013 22:16 schrieb "Christian Müller" <
> >> >>> christian.mueller@gmail.com
> >> >>> >:
> >> >>>
> >> >>> > Have a look into this project:
> >> >>> >
> >> https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
> >> >>> >
> >> >>> > Sent from a mobile device
> >> >>> > Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
> >> >>> >
> >> >>> >> Thks Claus for the answer, but I have not found the simplest way
> to
> >> do
> >> >>> a
> >> >>> >> simple:
> >> >>> >>
> >> >>> >>                 from("file://input")
> >> >>> >>                                 .split()
> >> >>> >>                                 .tokenize("\n")
> >> >>> >>                                 .unmarshal
> >> >>> >>                                 .bindy(BindyType.Csv, AED.class)
> >> >>> >>                                 .bean(AEDProcessor.class,
> >> >>> "processTicket")
> >> >>> >>                                 .marshal()
> >> >>> >>                                 .bindy(BindyType.Csv,
> >> AEDResult.class)
> >> >>> >>                                 [?????]
> >> >>> >>
> >> >>> .to("file://output?fileName=${file:name}")
> >> >>> >>
> >> >>> >> The only way I found is to do a :
> >> >>> >>
> >> >>> >> .to("file://output?fileName=${file:name}&fileExist=Append")
> >> >>> >>
> >> >>> >> But it is too slow !
> >> >>> >>
> >> >>> >>
> >> >>> >>
> >> >>> >>
> >> >>> >>
> >> >>> >> --
> >> >>> >> View this message in context:
> >> >>> >>
> >> >>>
> >>
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> >> >>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>> >>
> >> >>> >
> >> >>>
> >> >>
> >> >>
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: cibsen@redhat.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: Opposite of split

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Mar 5, 2013 at 11:03 AM, Jean Francois LE BESCONT
<jf...@gmail.com> wrote:
> Thanks for the link, but dynamic URI works great in classic to file :
>
> .to("file://" + OUT_DIR + "?fileName=${file:name}&fileExist=Append")
>
> But in my case :
> .from
> .split().tokenize("\n").streaming()
> .unmarsh
> .bindy
> .bean
> .marshal
> .bindy
> .to("stream:file?fileName="+ OUT_DIR +"OUT.csv&encoding=UTF-8")
>
> Write in a  file renamed " ${file "
>

You should use recipient list as "dynamic to" in Camel. As we say on the FAQ.


>
>
>
>
>
>
>
>
>
>
> 2013/3/5 Claus Ibsen <cl...@gmail.com>
>
>> On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT
>> <jf...@gmail.com> wrote:
>> > Christian, The stream file mecanism is awsome !
>> > But I have not found how to manage dynamic name with it .... something
>> like
>> > :
>> >   .to("stream:file?fileName=file.csv&encoding=UTF-8")
>> > works  but I would like to do :
>> >   .to("stream:file?fileName=${file:name}&encoding=UTF-8")
>> >
>>
>> Hi
>>
>> See this FAQ
>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>
>> >
>> >
>> >
>> > 2013/3/5 Jean Francois LE BESCONT <jf...@gmail.com>
>> >
>> >> Thks Ryan your like is very helpfull ! It make the trick.
>> >>
>> >> Thks Christian too, I now have a solution but I while check this code
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> 2013/3/5 Christian Müller <ch...@gmail.com>
>> >>
>> >>> Sorry, I mean this one:
>> >>>
>> https://github.com/muellerc/apachecon-na-2013/tree/master/file-component
>> >>>
>> >>> Sent from a mobile device
>> >>> Am 04.03.2013 22:16 schrieb "Christian Müller" <
>> >>> christian.mueller@gmail.com
>> >>> >:
>> >>>
>> >>> > Have a look into this project:
>> >>> >
>> https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
>> >>> >
>> >>> > Sent from a mobile device
>> >>> > Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
>> >>> >
>> >>> >> Thks Claus for the answer, but I have not found the simplest way to
>> do
>> >>> a
>> >>> >> simple:
>> >>> >>
>> >>> >>                 from("file://input")
>> >>> >>                                 .split()
>> >>> >>                                 .tokenize("\n")
>> >>> >>                                 .unmarshal
>> >>> >>                                 .bindy(BindyType.Csv, AED.class)
>> >>> >>                                 .bean(AEDProcessor.class,
>> >>> "processTicket")
>> >>> >>                                 .marshal()
>> >>> >>                                 .bindy(BindyType.Csv,
>> AEDResult.class)
>> >>> >>                                 [?????]
>> >>> >>
>> >>> .to("file://output?fileName=${file:name}")
>> >>> >>
>> >>> >> The only way I found is to do a :
>> >>> >>
>> >>> >> .to("file://output?fileName=${file:name}&fileExist=Append")
>> >>> >>
>> >>> >> But it is too slow !
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >> View this message in context:
>> >>> >>
>> >>>
>> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
>> >>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>> >>
>> >>> >
>> >>>
>> >>
>> >>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cibsen@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Opposite of split

Posted by Jean Francois LE BESCONT <jf...@gmail.com>.
Thanks for the link, but dynamic URI works great in classic to file :

.to("file://" + OUT_DIR + "?fileName=${file:name}&fileExist=Append")

But in my case :
.from
.split().tokenize("\n").streaming()
.unmarsh
.bindy
.bean
.marshal
.bindy
.to("stream:file?fileName="+ OUT_DIR +"OUT.csv&encoding=UTF-8")

Write in a  file renamed " ${file "











2013/3/5 Claus Ibsen <cl...@gmail.com>

> On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT
> <jf...@gmail.com> wrote:
> > Christian, The stream file mecanism is awsome !
> > But I have not found how to manage dynamic name with it .... something
> like
> > :
> >   .to("stream:file?fileName=file.csv&encoding=UTF-8")
> > works  but I would like to do :
> >   .to("stream:file?fileName=${file:name}&encoding=UTF-8")
> >
>
> Hi
>
> See this FAQ
> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>
> >
> >
> >
> > 2013/3/5 Jean Francois LE BESCONT <jf...@gmail.com>
> >
> >> Thks Ryan your like is very helpfull ! It make the trick.
> >>
> >> Thks Christian too, I now have a solution but I while check this code
> >>
> >>
> >>
> >>
> >>
> >>
> >> 2013/3/5 Christian Müller <ch...@gmail.com>
> >>
> >>> Sorry, I mean this one:
> >>>
> https://github.com/muellerc/apachecon-na-2013/tree/master/file-component
> >>>
> >>> Sent from a mobile device
> >>> Am 04.03.2013 22:16 schrieb "Christian Müller" <
> >>> christian.mueller@gmail.com
> >>> >:
> >>>
> >>> > Have a look into this project:
> >>> >
> https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
> >>> >
> >>> > Sent from a mobile device
> >>> > Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
> >>> >
> >>> >> Thks Claus for the answer, but I have not found the simplest way to
> do
> >>> a
> >>> >> simple:
> >>> >>
> >>> >>                 from("file://input")
> >>> >>                                 .split()
> >>> >>                                 .tokenize("\n")
> >>> >>                                 .unmarshal
> >>> >>                                 .bindy(BindyType.Csv, AED.class)
> >>> >>                                 .bean(AEDProcessor.class,
> >>> "processTicket")
> >>> >>                                 .marshal()
> >>> >>                                 .bindy(BindyType.Csv,
> AEDResult.class)
> >>> >>                                 [?????]
> >>> >>
> >>> .to("file://output?fileName=${file:name}")
> >>> >>
> >>> >> The only way I found is to do a :
> >>> >>
> >>> >> .to("file://output?fileName=${file:name}&fileExist=Append")
> >>> >>
> >>> >> But it is too slow !
> >>> >>
> >>> >>
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> View this message in context:
> >>> >>
> >>>
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> >>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>> >>
> >>> >
> >>>
> >>
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: Opposite of split

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT
<jf...@gmail.com> wrote:
> Christian, The stream file mecanism is awsome !
> But I have not found how to manage dynamic name with it .... something like
> :
>   .to("stream:file?fileName=file.csv&encoding=UTF-8")
> works  but I would like to do :
>   .to("stream:file?fileName=${file:name}&encoding=UTF-8")
>

Hi

See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

>
>
>
> 2013/3/5 Jean Francois LE BESCONT <jf...@gmail.com>
>
>> Thks Ryan your like is very helpfull ! It make the trick.
>>
>> Thks Christian too, I now have a solution but I while check this code
>>
>>
>>
>>
>>
>>
>> 2013/3/5 Christian Müller <ch...@gmail.com>
>>
>>> Sorry, I mean this one:
>>> https://github.com/muellerc/apachecon-na-2013/tree/master/file-component
>>>
>>> Sent from a mobile device
>>> Am 04.03.2013 22:16 schrieb "Christian Müller" <
>>> christian.mueller@gmail.com
>>> >:
>>>
>>> > Have a look into this project:
>>> > https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
>>> >
>>> > Sent from a mobile device
>>> > Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
>>> >
>>> >> Thks Claus for the answer, but I have not found the simplest way to do
>>> a
>>> >> simple:
>>> >>
>>> >>                 from("file://input")
>>> >>                                 .split()
>>> >>                                 .tokenize("\n")
>>> >>                                 .unmarshal
>>> >>                                 .bindy(BindyType.Csv, AED.class)
>>> >>                                 .bean(AEDProcessor.class,
>>> "processTicket")
>>> >>                                 .marshal()
>>> >>                                 .bindy(BindyType.Csv, AEDResult.class)
>>> >>                                 [?????]
>>> >>
>>> .to("file://output?fileName=${file:name}")
>>> >>
>>> >> The only way I found is to do a :
>>> >>
>>> >> .to("file://output?fileName=${file:name}&fileExist=Append")
>>> >>
>>> >> But it is too slow !
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
>>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>>> >>
>>> >
>>>
>>
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Opposite of split

Posted by Jean Francois LE BESCONT <jf...@gmail.com>.
Christian, The stream file mecanism is awsome !
But I have not found how to manage dynamic name with it .... something like
:
  .to("stream:file?fileName=file.csv&encoding=UTF-8")
works  but I would like to do :
  .to("stream:file?fileName=${file:name}&encoding=UTF-8")




2013/3/5 Jean Francois LE BESCONT <jf...@gmail.com>

> Thks Ryan your like is very helpfull ! It make the trick.
>
> Thks Christian too, I now have a solution but I while check this code
>
>
>
>
>
>
> 2013/3/5 Christian Müller <ch...@gmail.com>
>
>> Sorry, I mean this one:
>> https://github.com/muellerc/apachecon-na-2013/tree/master/file-component
>>
>> Sent from a mobile device
>> Am 04.03.2013 22:16 schrieb "Christian Müller" <
>> christian.mueller@gmail.com
>> >:
>>
>> > Have a look into this project:
>> > https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
>> >
>> > Sent from a mobile device
>> > Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
>> >
>> >> Thks Claus for the answer, but I have not found the simplest way to do
>> a
>> >> simple:
>> >>
>> >>                 from("file://input")
>> >>                                 .split()
>> >>                                 .tokenize("\n")
>> >>                                 .unmarshal
>> >>                                 .bindy(BindyType.Csv, AED.class)
>> >>                                 .bean(AEDProcessor.class,
>> "processTicket")
>> >>                                 .marshal()
>> >>                                 .bindy(BindyType.Csv, AEDResult.class)
>> >>                                 [?????]
>> >>
>> .to("file://output?fileName=${file:name}")
>> >>
>> >> The only way I found is to do a :
>> >>
>> >> .to("file://output?fileName=${file:name}&fileExist=Append")
>> >>
>> >> But it is too slow !
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >
>>
>
>

Re: Opposite of split

Posted by Jean Francois LE BESCONT <jf...@gmail.com>.
Thks Ryan your like is very helpfull ! It make the trick.

Thks Christian too, I now have a solution but I while check this code






2013/3/5 Christian Müller <ch...@gmail.com>

> Sorry, I mean this one:
> https://github.com/muellerc/apachecon-na-2013/tree/master/file-component
>
> Sent from a mobile device
> Am 04.03.2013 22:16 schrieb "Christian Müller" <
> christian.mueller@gmail.com
> >:
>
> > Have a look into this project:
> > https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
> >
> > Sent from a mobile device
> > Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
> >
> >> Thks Claus for the answer, but I have not found the simplest way to do a
> >> simple:
> >>
> >>                 from("file://input")
> >>                                 .split()
> >>                                 .tokenize("\n")
> >>                                 .unmarshal
> >>                                 .bindy(BindyType.Csv, AED.class)
> >>                                 .bean(AEDProcessor.class,
> "processTicket")
> >>                                 .marshal()
> >>                                 .bindy(BindyType.Csv, AEDResult.class)
> >>                                 [?????]
> >>
> .to("file://output?fileName=${file:name}")
> >>
> >> The only way I found is to do a :
> >>
> >> .to("file://output?fileName=${file:name}&fileExist=Append")
> >>
> >> But it is too slow !
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >
>

Re: Opposite of split

Posted by Christian Müller <ch...@gmail.com>.
Sorry, I mean this one:
https://github.com/muellerc/apachecon-na-2013/tree/master/file-component

Sent from a mobile device
Am 04.03.2013 22:16 schrieb "Christian Müller" <christian.mueller@gmail.com
>:

> Have a look into this project:
> https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component
>
> Sent from a mobile device
> Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:
>
>> Thks Claus for the answer, but I have not found the simplest way to do a
>> simple:
>>
>>                 from("file://input")
>>                                 .split()
>>                                 .tokenize("\n")
>>                                 .unmarshal
>>                                 .bindy(BindyType.Csv, AED.class)
>>                                 .bean(AEDProcessor.class, "processTicket")
>>                                 .marshal()
>>                                 .bindy(BindyType.Csv, AEDResult.class)
>>                                 [?????]
>>                                 .to("file://output?fileName=${file:name}")
>>
>> The only way I found is to do a :
>>
>> .to("file://output?fileName=${file:name}&fileExist=Append")
>>
>> But it is too slow !
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>

Re: Opposite of split

Posted by Christian Müller <ch...@gmail.com>.
Have a look into this project:
https://github.com/muellerc/apachecon-na-2013/tree/master/jms-component

Sent from a mobile device
Am 04.03.2013 11:36 schrieb "jeff" <jf...@gmail.com>:

> Thks Claus for the answer, but I have not found the simplest way to do a
> simple:
>
>                 from("file://input")
>                                 .split()
>                                 .tokenize("\n")
>                                 .unmarshal
>                                 .bindy(BindyType.Csv, AED.class)
>                                 .bean(AEDProcessor.class, "processTicket")
>                                 .marshal()
>                                 .bindy(BindyType.Csv, AEDResult.class)
>                                 [?????]
>                                 .to("file://output?fileName=${file:name}")
>
> The only way I found is to do a :
>
> .to("file://output?fileName=${file:name}&fileExist=Append")
>
> But it is too slow !
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Opposite of split

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Yes, that's slow. Would it be possible to do a bit of profiling and 
provide some metrics to identify where the bottleneck is?
Hadrian

On 03/04/2013 03:59 PM, Jean Francois LE BESCONT wrote:
> I have try to us BodyInAggregatingStrategy in [????] :
>
> .aggregate(header("CamelFileName"), new
> BodyInAggregatingStrategy()).completionTimeout(3000)
>
> But it is also slow ... 12 000 lines in 20 seconds, not possible for a
> mediation system...
>
>
> 2013/3/4 jeff <jf...@gmail.com>
>
>> Thks Claus for the answer, but I have not found the simplest way to do a
>> simple:
>>
>>                  from("file://input")
>>                                  .split()
>>                                  .tokenize("\n")
>>                                  .unmarshal
>>                                  .bindy(BindyType.Csv, AED.class)
>>                                  .bean(AEDProcessor.class, "processTicket")
>>                                  .marshal()
>>                                  .bindy(BindyType.Csv, AEDResult.class)
>>                                  [?????]
>>                                  .to("file://output?fileName=${file:name}")
>>
>> The only way I found is to do a :
>>
>> .to("file://output?fileName=${file:name}&fileExist=Append")
>>
>> But it is too slow !
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>

Re: Opposite of split

Posted by Ryan Moquin <fr...@gmail.com>.
This may be a silly question, but maybe adding the streaming() method (I
think it goes on the split) might help?  It's possible the single load into
memory before doing the splitting, is slowing it down.  I found this link
helpful, in case you haven't seen it:

http://www.catify.com/2012/07/09/parsing-large-files-with-apache-camel/

Regards,
Ryan


On Mon, Mar 4, 2013 at 3:59 PM, Jean Francois LE BESCONT <
jflebescont@gmail.com> wrote:

> I have try to us BodyInAggregatingStrategy in [????] :
>
> .aggregate(header("CamelFileName"), new
> BodyInAggregatingStrategy()).completionTimeout(3000)
>
> But it is also slow ... 12 000 lines in 20 seconds, not possible for a
> mediation system...
>
>
> 2013/3/4 jeff <jf...@gmail.com>
>
> > Thks Claus for the answer, but I have not found the simplest way to do a
> > simple:
> >
> >                 from("file://input")
> >                                 .split()
> >                                 .tokenize("\n")
> >                                 .unmarshal
> >                                 .bindy(BindyType.Csv, AED.class)
> >                                 .bean(AEDProcessor.class,
> "processTicket")
> >                                 .marshal()
> >                                 .bindy(BindyType.Csv, AEDResult.class)
> >                                 [?????]
> >
> .to("file://output?fileName=${file:name}")
> >
> > The only way I found is to do a :
> >
> > .to("file://output?fileName=${file:name}&fileExist=Append")
> >
> > But it is too slow !
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>

Re: Opposite of split

Posted by Jean Francois LE BESCONT <jf...@gmail.com>.
I have try to us BodyInAggregatingStrategy in [????] :

.aggregate(header("CamelFileName"), new
BodyInAggregatingStrategy()).completionTimeout(3000)

But it is also slow ... 12 000 lines in 20 seconds, not possible for a
mediation system...


2013/3/4 jeff <jf...@gmail.com>

> Thks Claus for the answer, but I have not found the simplest way to do a
> simple:
>
>                 from("file://input")
>                                 .split()
>                                 .tokenize("\n")
>                                 .unmarshal
>                                 .bindy(BindyType.Csv, AED.class)
>                                 .bean(AEDProcessor.class, "processTicket")
>                                 .marshal()
>                                 .bindy(BindyType.Csv, AEDResult.class)
>                                 [?????]
>                                 .to("file://output?fileName=${file:name}")
>
> The only way I found is to do a :
>
> .to("file://output?fileName=${file:name}&fileExist=Append")
>
> But it is too slow !
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Opposite-of-split-tp5728255p5728481.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>