What you could do is generating a xml file with the new route definitions
and load that.
http://camel.apache.org/loading-routes-from-xml-files.html
from("sql ...")
.process( generateRoutesXmlProcessor )
.doTypeConversionFromXmlToInputStream
.process( loadRoutesProcessor )
Jan
> -----Ursprüngliche Nachricht-----
> Von: mamouros [mailto:[email protected]]
> Gesendet: Dienstag, 1. Oktober 2013 17:58
> An: [email protected]
> Betreff: Creating routes dynamically like a for()
>
> 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.