Hi
I don't see from your example what you're really doing, I have an idea but I 
can't see it working, maybe post the actual ugly routes.

You can also consider a recipient list for all your SQL stuff, or multicast, it 
doesn't have to be in parallel.
Eg from("direct:import").multicast().to("sql:query1", "sql:query2")

Taariq

> On 13 Dec 2013, at 23:46, "richie.rivi...@gmail.com" 
> <richie.rivi...@gmail.com> wrote:
> 
> Hi All,
> 
> I've got two main routes in my application. An import route and an export
> route.
> 
> At the end of my import route i say... .to("direct:import");
> 
> Then at the start of my export i say ... .from("direct:import")
> 
> Pretty standard stuff.
> 
> Yesterday I had to change my application to run about 5 post processing
> routes that execute sql queries to run after the import and before the
> export. I did this using the sql component. This worked fine. But i had to
> link them all up using the direct component.
> 
> i.e.
> to(direct)>from(direct),(direct)>from(direct),(direct)>from(direct),(direct)>from(direct)
> etc
> 
> It's starting to get ugly now....
> 
> Can anyone give me some ideas on how to structure my routes to make it a bit
> nicer. Really there are three parts to my application now..
> 
> An import route, some post processing and an export route. Is there a way
> that I can have some sort of container route for all my post processing
> routes? They can't all run parallel because some of the sql queries are
> dependent on each other.
> 
> My original thought was just to have one routeBuilder with many from and to
> definitions...
> 
> from("direct:import").to("sql:query1")
> 
> from("direct:import").to("sql:query2")
> 
> from("direct:import").to("sql:query3")
> 
> But I found out yesterday you can't do this. I get a camel error saying
> multiple routes are linked to "direct:import".
> 
> thanks for your help
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Ideas-on-how-to-structure-route-alternatives-to-direct-tp5744748.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to