camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel File2 component - FileExist=Append - carriage return ?
Date Fri, 12 Mar 2010 14:01:46 GMT
Hi

Yeah just append a \n on the data you send to the file endpoint, then
the file ends with a \n so it can append nicely.

You can use this DSL for that
.transform().body(append("\n"))


On Fri, Mar 12, 2010 at 2:46 PM, Charles Moulliard <cmoulliard@gmail.com> wrote:
> The parameter FileExist=Append of the Camel File2 component adds the content
> at the end of the previous text without adding a carriage return. Is there
> an option for that or Do I have to add the carriage return in the route ?
>
>            <camel:from
> uri="activemq:topic:ActiveMQ.Advisory.MasterBroker?mapJmsMessage=false" />
>            <camel:convertBodyTo type="java.lang.String"/>
>            <camel:to
> uri="file://data/activemq/?fileExist=Append&amp;fileName=advisoryMasterBroker-${date:now:yyyyMMdd}.txt"
> />
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message