camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goyal, Arpit" <arpit.go...@sap.com>
Subject First time create SFTP File and then Append to same in loop.
Date Wed, 31 Aug 2016 00:46:40 GMT
Hi Colleagues,

We have the following route:

from("xxx:inbound").process(new MyProcessor()).choice(when(header("record_count").isGreaterThan(0)).to("sftp://xyx[?options]").to("xxx:inbound").otherwise(new
MyEndProcessor())

It is a simple loop condition using choice where one branch process data and send to SFTP
server and then loop back where else other branch would end the process.

Question: In FIRST SFTP write we want the FILE to be created. When second call comes, then
we want APPEND to happen. How can we achieve this? Was searching for some header where I can
toggle the value of 'fileExists'.

Can I change end point configuration using some custom bean? Please help.

Regards,
Arpit.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message