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 <[email protected]>
> On Tue, Mar 5, 2013 at 9:36 AM, Jean Francois LE BESCONT
> <[email protected]> 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 <[email protected]>
> >
> >> 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 <[email protected]>
> >>
> >>> 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" <
> >>> [email protected]
> >>> >:
> >>>
> >>> > 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" <[email protected]>:
> >>> >
> >>> >> 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: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>