camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-6632) Camel-kestrel consumer do not shutdown because of (not existing) inflight exchanges
Date Sun, 15 Feb 2015 17:16:11 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-6632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-6632.
--------------------------------
    Resolution: Unresolved

Kestrel is EOL 

> Camel-kestrel consumer do not shutdown because of (not existing) inflight exchanges
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-6632
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6632
>             Project: Camel
>          Issue Type: Bug
>          Components: extra
>    Affects Versions: 2.11.1
>         Environment: Mac OS X and Debian
>            Reporter: Tommaso Schiavinotto
>
> *** camel-kestrel missing from component list ***
> I've a Camel process (that I run from command line) which route is similar to this one:
> public class ProfilerRoute extends RouteBuilder {
>  @Override
>  public void configure() {   
>     from("kestrel://my_queue?concurrentConsumers=10&waitTimeMs=500")
>         .unmarshal().json(JsonLibrary.Jackson, MyClass.class)
>         .process(new Processor() {
>                  @Override
>                  public void process(Exchange exchange) throws Exception {
>                      /* Do the real processing [...] */
>                      exchange.getIn().setBody(null);
>                  }
>         })
>         .filter(body().isNotNull())
>         .to("file://nowhere");
>  }
> }
> Note that I'm trashing whatever message after having processed it, being this a pure
consumer process.
> The process is run by its own. No other process is writing on the queue, the queue is
empty. However when I try to kill the process the process is not going to die.
> From the logs I see the following lines (indented for readability):
> [                      Thread-1] MainSupport$HangupInterceptor  INFO  
>                                  Received hang up - stopping the main instance.
> [                      Thread-1] MainSupport                    INFO
>                                  Apache Camel stopping
> [                      Thread-1] GuiceCamelContext              INFO
>                                  Apache Camel 2.11.1 (CamelContext: camel-1) 
>                                  is shutting down
> [                      Thread-1] DefaultShutdownStrategy        INFO
>                                  Starting to graceful shutdown 1 routes 
>                                  (timeout 300 seconds)
> [l-1) thread #12 - ShutdownTask] DefaultShutdownStrategy        INFO
>                                  Waiting as there are still 10 inflight and 
>                                  pending exchanges to complete, 
>                                  timeout in 300 seconds.
> And so on with decreasing timeout. At the end of the timeout I get on the logs:
> [l-1) thread #12 - ShutdownTask] DefaultShutdownStrategy        INFO
>                                  Waiting as there are still 10 inflight and 
>                                  pending exchanges to complete,
>                                  timeout in 1 seconds.
> [                      Thread-1] DefaultShutdownStrategy        WARN
>                                  Timeout occurred. 
>                                  Now forcing the routes to be shutdown now.
> [l-1) thread #12 - ShutdownTask] DefaultShutdownStrategy        WARN
>                                  Interrupted while waiting during graceful 
>                                  shutdown, will force shutdown now.
> [                      Thread-1] KestrelConsumer                INFO  
>                                  Stopping consumer for 
>                                  kestrel://localhost:22133/my_queue?concurrentConsumers=10&waitTimeMs=500
> But the process will not die anyway (even if I try to kill it at this point).
> I would have expected that after the waiting time all the threads would realise that
a shutdown is going on and stop.
> I've read the "Graceful Shutdown" document, however I could not find something that explains
the behaviour I'm facing.
> As you can see from logs I'm using the 2.11.1 version of Apache Camel.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message