I can see that the Jetty consumer is responding with 503 - "Service
unavailable" during the grace-period. I can see from CAMEL-2660 that this
is by intention/design. I was actually hoping that the listening socket was
unbound instead, but as I control the producer code I think I can handle
the 503. My issue is that this is a financial system, so I need to differ
between approved, rejected and unknown status (the latter would require a
reversal/rollback).

Will test the same thing with Mina TCP shortly. In that case we don't
control the clients/producers, so I really hope for a "connection refused"
in the grace-period.

Thanks,
Thomas

2012/5/9 Claus Ibsen <claus.ib...@gmail.com>

> On Wed, May 9, 2012 at 8:13 AM, Thomas Johansen <thxm...@gmail.com> wrote:
> > Hi,
> >
> > I've been looking at the shutdown strategy support, but can't find a way
> to
> > drain stop my routes.
> >
> > I.e. I have an application with several Mina TCP and Jetty consumer
> routes.
> > When shutting down the first thing I want to happen is that these routes
> > stop consuming any more messages which in practice means that their
> > listening sockets are unbound. THEN I want the current inflight exchanges
> > to complete before shutdown.
> >
>
> This should happen currently. The consumer is being shutdown first.
> Then the in flight messages is being processed, and when no more messages
> then the shutdown is complete.
>
> Do you see something else?
> You can enable DEBUG logging at the
> org.apache.camel.impl.DefaultShutdownStrategy
> and see what it logs.
>
>
>
>
> > Is this easily achievable without too much custom code? I guess this
> > problem goes for all routes which are not polling consumers...
> >
> > Takk,
> > Thomas
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to