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: Compressing file after Move
Date Thu, 02 Feb 2012 17:33:08 GMT
On Thu, Feb 2, 2012 at 6:28 PM, ebinsingh
<ebenezer.singh@verizonwireless.com> wrote:
> Thanks, I tried using gzip (As we moved to Solaris) and it does work as
> expected.
> But my issue is to compress before moving the files to back up.
>
> <endpoint id="acquireltel2TAP"
> uri="file:/work_dir/data/input/tap?move=/work_dir/data/input/bkp/tap" />
>
> The above endpoint moves the file as such to the directory
> "/work_dir/data/input/bkp/tap". But we want the file to be compressed before
> being backed up.
>
> Is there a way of doing this.
>

Ah nice to know. No the ?move option on the camel endpoint will
*always* do a File IO move operation on the input file.

So you need to move the file in your Camel route instead, and use
noop=true&idempoten=false on the file endpoint uri.

Something along the lines off

from file
   do route stuff here
   gzip
   to (file:backup)

I guess it may be nice to have some way of gzip support built-in the
file endpoint.
It is a bit common to compress backup files.

However in the past I have done it outside Java using scripts on servers.
But some level of support in Camel would be nice.





> --
> View this message in context: http://camel.465427.n5.nabble.com/Compressing-file-after-Move-tp5451023p5451388.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message