What you will probably want to do is do a split on the ids so you then have
a subroute on each ID. Each subroute then needs to access the database, for
which you will not use a from, but more probably a content enricher to read
from the SQL endpoint.


On Fri, Sep 27, 2013 at 6:00 PM, lumi <[email protected]> wrote:

> Hi,
> I don’t know how to pass data from one route that reads a file to another
> route that is polling a database.
>
> First route reads id from file.
>
>       from("file:testcsv")
>       .unmarshal().csv()
>       .to("direct:point1");
>
> Second route needs to use the id in the sql
>
>         from("timer://myTimer?period=1000")
>         .to("sql:select * from test where id = #")
>         .marshal().csv()
>         .to("file:target/out ");
>
>
> With sql consumer faced the same question.
>
>         from ("sql:select * from test where id = #?consumer.delay=1000")
>         .marshal().csv()
>         .to("file:target/out");
>
> It seems that I’m missing something very basic here, please help.
>
> Thanks and regards,
> Lumi
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/passing-data-to-a-polling-consumer-tp5740313.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Dale King

Reply via email to