In this case you can use a producer template and send the received message
(file) to what ever endpoint you want, e.g. a direct endpoint. And for this
endpoint, you can develop a route with the functionality you want:

from("direct:start")
  .to("...")
  ...
  .to("..");

Exchange exchange = receiveNoWait("file://...?
fileName=foo.txt&noop=true");
if (exchange != null) {
    YourCustomBean bean = exchange.getIn().getBody(YourCustomBean.class);

    producerTemplate.sendBody("direct:start", bean);
}


Best,
Christian

On Tue, Jan 29, 2013 at 8:31 AM, Lars-Erik Helander <leh...@gmail.com>wrote:

> In general I meant the transformation to be part of these steps, in some
> cases it it only the transformation that takes place between reading the
> file and consumer reception, but there could be other steps to.
>
> Skickat från min iPhone
>
> 28 jan 2013 kl. 23:22 skrev Christian Müller <christian.muel...@gmail.com
> >:
>
> > Don't understand. You have to do something else BEFORE you can read the
> > file? Or AFTER reading the file and BEFORE you transform the content?
> >
> > Sent from a mobile device
> > Am 27.01.2013 20:47 schrieb "helander" <leh...@gmail.com>:
> >
> >> Hi Christian,
> >>
> >> sounds simple :)
> >>
> >> However before the consumer can consume the contents of the file, it
> needs
> >> to be processed by some additonal (route)-steps, how would I do that?
> >>
> >> Thanks
> >>
> >> Lars
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://camel.465427.n5.nabble.com/Reading-a-file-tp5726376p5726388.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
>



--

Reply via email to