camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leemorris12 <>
Subject Pushing directory to SFTP dynamically
Date Fri, 12 Oct 2012 23:59:04 GMT

I have a scenario where my camel route is generating several documents into
a single directory.  I need to send these documents to various SFTP servers,
the uri's of which have to be generated at runtime.

I need to send the documents to multiple servers - I'm currently specifying
my endpoints in a header, and using recipientList to push the files to each
entry in the header.  My problem is that the files are not in the body of
the exchange, I have other data in there.  I can use the onPrepareRef of the
recipientList to set the body to a FileInputStream (which the sftp component
accepts), however I can't use FileInputStream against a directory.  As a
result I can only upload 1 file.

The only way I can think to get around this is to generate a new route every
time and split the files to the ftp component, but this seems really

Is there any way I can specify multiple files in the message that is passed
to the ftp component?

I'm using camel 2.10.1.


View this message in context:
Sent from the Camel Development mailing list archive at

View raw message