4 Replies Latest reply on May 24, 2012 8:11 AM by Claus Ibsen

    Route with same routeId killing previous route

    jamie archibald Apprentice

      I have a custom camel component for a pub/sub system which is defined in a routers as follows:

       

      class Router extends RouteBuilder() {

         from("customComponent:foo")

            .routeId("My Consumer")

            .to("log:${body}");

      }

       

      I'm creating two instances of the Router and adding them to the camel context. For some reason the second one seems to kill the first one. And by "kill" I mean when messages are received at "customComponent:foo" only the second router receives the message.

       

       

      main() {

       

         context.addRoutes(new Router());

         context.addRoutes(new Router());

      }

       

       

      Examining the camel logs didn't reveal anything. Before I get into examining the camel code I'm wondering if this is by design or a possible a bug?