Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    from("seda:foo").startupOrder(21).to("mock:result");
    from("direct:start").startupOrder(12).to("seda:foo");

And the same example with XML DSL:

Code Block
xml
xml
    <route startupOrder="21">
        <from uri="seda:foo"/>
        <to uri="mock:result"/>
    </route>

    <route startupOrder="12">
        <from uri="direct:start"/>
        <to uri="seda:foo"/>
    </route>

In this example we have two routes in which we have started that the direct:start route should be started before the after the seda:foo route.
As direct:start is consider the input and we want that seda:foo route to be up and running beforehand.

You can also mix and match routes with and without startupOrder define.

...

Code Block
    from("seda:foo").startupOrder(21).to("mock:result");
    from("direct:start").startupOrder(12).to("seda:foo");

    from("direct:bar").to("seda:bar");

...

Code Block
xml
xml
    <route startupOrder="21">
        <from uri="seda:foo"/>
        <to uri="mock:result"/>
    </route>

    <route startupOrder="12">
        <from uri="direct:start"/>
        <to uri="seda:foo"/>
    </route>

    <route>
        <from uri="direct:bar"/>
        <to uri="seda:bar"/>
    </route>

...