camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: Creating routes dynamically like a for()
Date Tue, 01 Oct 2013 21:20:45 GMT
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:csst0211@yahoo.gr]
> Gesendet: Dienstag, 1. Oktober 2013 17:58
> An: users@camel.apache.org
> 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.


Mime
View raw message