Not clear what you are trying to achieve exactly, but I think what you want is 
the splitter which in this case you would use to execute the route for each 
record. Something like the following will call the method for each record 
returned from the SQL.

from("sql:" + fromUri + "?dataSource=dataSource")
.split(body())
.to("bean:SmsReceiver?method=creatingRoutes");

On Oct 1, 2013, at 11:58 AM, mamouros <csst0...@yahoo.gr> wrote:

> I would like to create a route for every query my sql route returns.
> From this:
> 
> from("sql:" + fromUri + "?dataSource=dataSource")
> .to("bean:SmsReceiver?method=creatingRoutes");
> 
> I want to make something hypothetically like this:
> 
> for( from("sql:" + fromUri + "?dataSource=dataSource") )  {
> 
>     .to("bean:SmsReceiver?method=creatingRoutes");
> 
> }
> 
> so if I have 3 entries in my table, I would create 3 routes.
> 
> How is that possible. Is there any EIP that does that?
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to