You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/03/12 14:46:50 UTC

Camel File2 component - FileExist=Append - carriage return ?

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

Re: Camel File2 component - FileExist=Append - carriage return ?

Posted by Charles Moulliard <cm...@gmail.com>.
Thx

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


On Fri, Mar 12, 2010 at 3:01 PM, Claus Ibsen <cl...@gmail.com> wrote:

> 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 <cm...@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
>

Re: Camel File2 component - FileExist=Append - carriage return ?

Posted by Claus Ibsen <cl...@gmail.com>.
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 <cm...@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