You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Luiz Eduardo Guida Valmont <va...@alis-sol.com.br> on 2019/01/17 20:53:39 UTC

Multiple Routes and Starvation

Hi!


Friends, I need help: I tried creating multiple camel contexts on a 
single spring boot application, the start method from CamelContext does 
not yield no exceptions yet it seems they are dormant.


After fiddling with the master component, I realized I've been using 
Camel the wrong. Or so I believe.


I've got a spring boot app with many routes, which are mostly 
independent from one another (save from the "route A calls route B 
through direct:" pattern). I asked for help here the other day and 
Andrea Consentino talked of the master component.


Things got better. I had no duplicate execution of the routes as far as 
I could tell. But subsequent executions were unevenly spaced in time. 
That is bad considered they are quartz2 time sensitive routes.


Enter this link: 
https://medium.freecodecamp.org/configure-multiple-camel-context-in-spring-boot-application-d3a16396266 
(it basically talks about a way of getting multiple CamelContext's going)


I came accross it because I believe firing up independent contexts for 
the independent routes will make things work as expected. As it were, 
one of the routes would suck up almost all threading resources and leave 
other quartz2 routes to starve.


So I did as this link suggested, got into a bit of trouble because 
Spring Boot failed to fire up the application because there were 
multiple CamelContexts present, created a default context with no routes 
and... this is where I'm at.


I suppose it has to do with the default-context-that-has-no-routes. But 
there's the start method, a log right after it telling of success to its 
call and a log in a catch block for the start call.


Any help, tips and hints are dearly and greatly appreciated.


Thanks!

Luiz