camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How can I start more than one Camel Context in Spring Boot ?
Date Mon, 03 Jul 2017 15:47:35 GMT
I don't recommend doing that.

Keep 1 camel context per spring boot app, to keep it simple. Spring
Boot is not like an app server where you host X apps, its intended for
1 app only.



On Mon, Jul 3, 2017 at 5:16 PM, labo <joerg@larbig.net> wrote:
> Hello,
>
> I want to start more than one camel context in a spring boot application.
>
> I declare two contexts like
>
> @ContextName("multi-one")
>         class MultiOneCamelContext extends DefaultCamelContext {
>             @PostConstruct
>             void customize() {
>
>             SimpleRegistry reg = new SimpleRegistry();
>             PropertiesComponent pc = new PropertiesComponent();
>
>
> and create the routes like
>
> @Component
> @ContextName("multi-one")
> public class MultiOneRoute extends RouteBuilder{
>
>         @Override
>         public void configure() throws Exception {
>
>
> but my routes are always assigned to context camel-1
>
> Thank you
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-can-I-start-more-than-one-Camel-Context-in-Spring-Boot-tp5805707.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message