camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zulio84 <>
Subject Camel Ftp
Date Wed, 02 Oct 2013 16:54:53 GMT
Hello everybody,

I'm trying to achieve the following scenario:

1. read a file using the FTP component, once you read the contents of this
file via another endpoint FTP i fetch a second file; (In both cases, I use
the inputstream content in the body).

2. Now I would like to replace the body of the first exchange with the body
of the second.

I'm managing very large files, I would not buffer the message, but simply
replace the reference of the inputstream.

I tried with the following statement:

InputStream is = sourceExchange.getIn ().getBody(InputStream.class);
destExchange.getIn (). setBody (is, InputStream.class);

and the variants:

a) InputStream is = sourceExchange.getIn (). getBody (InputStream.class);
destExchange.getIn (). setBody (is);

b) destExchange.getIn (). setBody (sourceExchange.getIn (). getBody

c) destExchange.getIn (). setBody (sourceExchange.getIn (). getBody ());

When I go to read the stream forward in the route, the stream is not valid,
it's empty.

Someone can 'help me? Thank you.

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

View raw message