You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sap <pa...@gmail.com> on 2017/06/06 17:41:23 UTC

How to read a file in chain(or middle) of routes.

Hi. 

I need to read a file in middle of route. 
for example.

from("sql:blabla")
.to("file:locationbla?filename=bla&noop=true") <---- this is where I need to
read from file.
.process(new BlaProcessor())
.to("file:locationbla?filename=bla"); <--same location that I read before.

above code tries to write to file and complains that file not found.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-read-a-file-in-chain-or-middle-of-routes-tp5801982.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to read a file in chain(or middle) of routes.

Posted by Claus Ibsen <cl...@gmail.com>.
See the content enricher eip
http://camel.apache.org/content-enricher.html

there is a pollEnrich you can use to read a file.

On Tue, Jun 6, 2017 at 7:41 PM, sap <pa...@gmail.com> wrote:
> Hi.
>
> I need to read a file in middle of route.
> for example.
>
> from("sql:blabla")
> .to("file:locationbla?filename=bla&noop=true") <---- this is where I need to
> read from file.
> .process(new BlaProcessor())
> .to("file:locationbla?filename=bla"); <--same location that I read before.
>
> above code tries to write to file and complains that file not found.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-read-a-file-in-chain-or-middle-of-routes-tp5801982.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: How to read a file in chain(or middle) of routes.

Posted by sap <pa...@gmail.com>.
Perfect! thanks!



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-read-a-file-in-chain-or-middle-of-routes-tp5801982p5802012.html
Sent from the Camel - Users mailing list archive at Nabble.com.