You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jamiro <di...@uv.ruhr-uni-bochum.de> on 2015/03/24 20:27:35 UTC

setup FTP producer scenario

I want to achieve the following producer endpoint behaviour with FILE/FTP
component:

step #1: upload to myfile.tmp (if it's already there: append to it)
step #2: try to rename myfile.tmp to myfile.dat when done (ignoring any
errors if myfile.dat already exists)

I tried with configuration
fileName=myfile.dat&fileExist=Append&tempFileName=myfile.tmp
I expected myfile.dat would contain the first upload, subsequent uploads to
be appended to .tmp file
but myfile.dat is overwritten on every upload. 



--
View this message in context: http://camel.465427.n5.nabble.com/setup-FTP-producer-scenario-tp5764713.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: setup FTP producer scenario

Posted by jmhamm <ha...@sutterhealth.org>.
I was trying to accomplish this same sort of functionality.  Is there a
specific min version that would allow us to write to one file and then
rename on completion?

The specifics behind mine were to have a route that pulled messages off of a
queue and append a file until a timer went off then the file would be
renamed to finalize the file.



--
View this message in context: http://camel.465427.n5.nabble.com/setup-FTP-producer-scenario-tp5764713p5764841.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: setup FTP producer scenario

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah yeah dont think you can write to temp and append. For append it
should append directly to the real file.

On Wed, Mar 25, 2015 at 10:10 AM, jamiro
<di...@uv.ruhr-uni-bochum.de> wrote:
> I use camel 2.13.3, so Append should be supported.
> Problem is that Append and tempFileName doesn't work like I need it: upload
> is appended to the .tmp file but then the .dat file ist overwritten.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/setup-FTP-producer-scenario-tp5764713p5764742.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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: setup FTP producer scenario

Posted by jamiro <di...@uv.ruhr-uni-bochum.de>.
I use camel 2.13.3, so Append should be supported.
Problem is that Append and tempFileName doesn't work like I need it: upload
is appended to the .tmp file but then the .dat file ist overwritten.



--
View this message in context: http://camel.465427.n5.nabble.com/setup-FTP-producer-scenario-tp5764713p5764742.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: setup FTP producer scenario

Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel do you use? You may need to upgrade to have
support for append

On Tue, Mar 24, 2015 at 8:27 PM, jamiro
<di...@uv.ruhr-uni-bochum.de> wrote:
> I want to achieve the following producer endpoint behaviour with FILE/FTP
> component:
>
> step #1: upload to myfile.tmp (if it's already there: append to it)
> step #2: try to rename myfile.tmp to myfile.dat when done (ignoring any
> errors if myfile.dat already exists)
>
> I tried with configuration
> fileName=myfile.dat&fileExist=Append&tempFileName=myfile.tmp
> I expected myfile.dat would contain the first upload, subsequent uploads to
> be appended to .tmp file
> but myfile.dat is overwritten on every upload.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/setup-FTP-producer-scenario-tp5764713.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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/