camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From druminski <>
Subject New camel component which dynamically adds routes when it starts.
Date Mon, 10 Dec 2012 10:43:48 GMT

I am working on a new camel component. The Purpose of the new component is
to simplify routes like this:

To route like this:

So I would like to add dynamically two routes (which send and receive
exchanges from "nmr" component) when "nmrref" component/consumer starts. 
At the moment I have NmrRefConsumer class which extends DefaultConsumer. The
doStart() method is overriden:

    protected void doStart() throws Exception {

        RouteBuilder routeBuilder = new RouteBuilder() {
            public void configure() throws Exception {
                from("ref:" + refAddr)
                    .to("nmr:" + nmrAddr);

                from("nmr:" + nmrAddr)

        for(RouteDefinition routeDefinition :
routeBuilder.getRouteCollection().getRoutes()) {
But it looks like this dynamic routes doesn't start in camelContext. Do you
know why and how can I fix this?

Thanks for reply.

Best regards
Lukasz Druminski

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message