Hi

Thanks for that Claus. I thought it would be easy enough.

Regarding my first query, is it possible to configure Camel file2/ftp to 
consume the .data file, leave it on the server (as performed by noop=true) but 
remove the .ready file ? 

The reason is that we have multiple consumers (other than ServiceMix) of each 
.data file and each consumer gets a different .ready file when each .data is 
ready for collection.

Any thoughts?

James




-----Original Message-----
From: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Sent: 27 October 2014 19:03
To: users@camel.apache.org
Subject: Re: Questions about doneFileName

Hi

See
http://camel.apache.org/file-language.html

You should use:
doneFileName=${file:name.noext}.ready

On Mon, Oct 20, 2014 at 10:53 AM, BURN, James <james.b...@oup.com> wrote:
> Sorry I should add, this is using ServiceMix 5.3.0 and camel 2.13.2
>
> Cheers
> J
>
> -----Original Message-----
> From: BURN, James [mailto:james.b...@oup.com]
> Sent: 20 October 2014 09:48
> To: users@camel.apache.org
> Subject: Questions about doneFileName
>
> Hi
>
> We are using ServiceMix to subscribe to a service by looking for "done files" 
> (.ready) before downloading a copy of the data (.dat) files.
>
> One problem we have is that once we have downloaded a copy of a data file we 
> must remove the .ready file but leave the .dat file
>
> Here is my route:
>
>             <camelContext xmlns="http://camel.apache.org/schema/blueprint"; 
> id="camel-ftpdownload">
>                         <route>
>                                     <from 
> uri="file:/data/readyfiletestIn/?doneFileName=${file:name}.ready&amp;delete=false"/>
>                                     <to uri="file:/data/readyfiletestOut"/>
>                         </route>
>             </camelContext>
>
> We've also tried noop=true but this leaves a .ready file once we have 
> downloaded a copy of the .dat.
>
> We can work around this by calling a XSLT next in the route to delete the 
> .ready file independently, but this seems to be compounding the route 
> complexity.
>
> Q2 - the doneFileNames we are get aren't necessarily the .dat file name with 
> a .ready extension. What is the best way to work with this. Ie where we want 
> to work with:
> datafile123.dat and datafile123.ready   rather than datafile123.dat and 
> datafile123.dat.ready   ?
>
> Thanks
>
> James



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to