camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Johansen <thxm...@gmail.com>
Subject Re: Graceful shutdown with drain stopping
Date Thu, 10 May 2012 14:58:31 GMT
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.ibsen@gmail.com>

> On Wed, May 9, 2012 at 8:13 AM, Thomas Johansen <thxmasj@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: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message