On Sat, Sep 8, 2012 at 11:48 AM, gilboy <josephoto...@gmail.com> wrote:
> Hi
>
> I am trying to ensure I understand the significance of the ordering of
> routes
>
> Assume I have route #1 which publishes messages on to a SEDA Queue, e.g.
> *from(endpoint).to(sedaQueue)*
>
> and I have  route #2 which consumes messages from the same seda queue, e.g.
> *from(sedaQueue).to(endpoint)*.
>
> I should set the startup order on route #2 to be 1 and the startup order of
> route number 1 to be 2. Right?
>
> Secondly, I should use the ShutdownRoute.Defer option on route #2. Right?
>

You could do that. But the graceful shutdown of Camel has been
significant improved since, and it would handle this for you out of
the box.

The ordering can still come handy when you want to control the
start|stop ordering more strictly.
Or if you use custom components, which may require to be shutdown earlier.

Camel offers custom components to let its consumers affect the
graceful shutdown if they implement
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/ShutdownAware.html



> Thanks in advance
> Joe
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Ordering-of-routes-and-ShutdownRoute-Defer-option-tp5718891.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to