You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kalber <Ka...@swslt.com> on 2016/11/24 09:23:50 UTC

SFTP via quartz2 , after first call returns only 1 file instead of all files again

I have a strange behavior with sftp component launching from crontab;

sftp defintition :

sftp://www.myhost.it/./path?
username=myname
&noop=true&sortBy=file:name
&include=(VC3|M)[0123456789]*
&privateKeyFile=/home/myname/.ssh
&scheduler=quartz2&scheduler.cron=0 45,46,47 * * * ?

result :

1. call log :
24-11-2016 09:45:00 INFO  [DefaultQuartzScheduler-camel-1_Worker-1] MAIN: xx
M2001
24-11-2016 09:45:00 INFO  [DefaultQuartzScheduler-camel-1_Worker-1] MAIN: xx
M2002
24-11-2016 09:45:00 INFO  [DefaultQuartzScheduler-camel-1_Worker-1] MAIN: xx
M2003
24-11-2016 09:45:01 INFO  [DefaultQuartzScheduler-camel-1_Worker-1] MAIN: xx
M2004
24-11-2016 09:45:01 INFO  [DefaultQuartzScheduler-camel-1_Worker-1] MAIN: xx
M2005
24-11-2016 09:45:01 INFO  [DefaultQuartzScheduler-camel-1_Worker-1] MAIN: xx
M2006
......
.....
2. call log :
24-11-2016 09:46:01 INFO  [DefaultQuartzScheduler-camel-1_Worker-2] MAIN: xx
M2001

3. call log:
24-11-2016 09:47:00 INFO  [DefaultQuartzScheduler-camel-1_Worker-3] MAIN: xx
M2002

------------------------------------
Second  call returns only the first file, third  call returns only the
second file 
and so on.

Why from second call onwards ftp returns only on file and not all file again
?

I'm using camel 2.18.






-----
kh
--
View this message in context: http://camel.465427.n5.nabble.com/SFTP-via-quartz2-after-first-call-returns-only-1-file-instead-of-all-files-again-tp5790470.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SFTP via quartz2 , after first call returns only 1 file instead of all files again

Posted by kalber <Ka...@swslt.com>.
Thanks Klaus,

setting idempotent=false it's works.


Regards
Karlheinz





-----
kh
--
View this message in context: http://camel.465427.n5.nabble.com/SFTP-via-quartz2-after-first-call-returns-only-1-file-instead-of-all-files-again-tp5790470p5790524.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SFTP via quartz2 , after first call returns only 1 file instead of all files again

Posted by Klaus Johansen <kl...@gmail.com>.
Hi,

When you set noop=true then camel sets idempotent=true (see
http://camel.apache.org/file2.html). 

Since the file names seems to be the same Camel is not supposed to return
any files at all on the 2nd and 3rd run. Did M2001 and M2002 change in
regard to size or date/time?

You could try to set idempotent=false if you want to receive all the files
again on the 2nd and 3rd poll. 

Regards,
Klaus



--
View this message in context: http://camel.465427.n5.nabble.com/SFTP-via-quartz2-after-first-call-returns-only-1-file-instead-of-all-files-again-tp5790470p5790503.html
Sent from the Camel - Users mailing list archive at Nabble.com.