You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "BURN, James" <Ja...@oup.com> on 2014/10/20 10:47:49 UTC
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&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
Re: Questions about doneFileName
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Not sure if we changed/fixed so noop=true will delete the done file
always or not. I suggest to check the source code what happens today
on master branch.
On Tue, Oct 28, 2014 at 2:29 PM, BURN, James <Ja...@oup.com> wrote:
> 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.ibsen@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 <Ja...@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.Burn@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&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: cibsen@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/
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@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/
RE: Questions about doneFileName
Posted by "BURN, James" <Ja...@oup.com>.
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.ibsen@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 <Ja...@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.Burn@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&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: cibsen@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/
Re: Questions about doneFileName
Posted by Claus Ibsen <cl...@gmail.com>.
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 <Ja...@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.Burn@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&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: cibsen@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/
RE: Questions about doneFileName
Posted by "BURN, James" <Ja...@oup.com>.
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.Burn@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&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