camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Minh Tran <darth.minhs...@gmail.com>
Subject Re: spring boot shutdown strategy
Date Wed, 20 Jul 2016 12:01:59 GMT
I’m using the @CamelSpringBootJUnit4ClassRunner but I guess it is probably using the same
10s default too.

I just tried starting up the application and shutting it down and it’s still on the default
300s there

Starting to graceful shutdown 1 routes (timeout 300 seconds)

Pretty certain my bean is being created as I can set a breakpoint on it and the debugger will
stop there. Here is what I have defined 

       @Bean
       public ShutdownStrategy shutdownStrategy() {
		DefaultShutdownStrategy strategy = new DefaultShutdownStrategy();
		strategy.setTimeout(30);
		return strategy;
	}

> On 20 Jul 2016, at 9:51 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> 
> The camel-test-kit uses a 10 sec override by default.
> https://github.com/apache/camel/blob/master/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java#L433
> 
> On Wed, Jul 20, 2016 at 7:43 AM, Minh Tran <darth.minhster@gmail.com> wrote:
>> Hi
>> 
>> I’ve tried both 2.17.1 and 2.17.2 and it seems to have no effect. My unit tests
always says 10seconds.
>> 
>> Starting to graceful shutdown 1 routes (timeout 10 seconds)
>> 
>> 
>>> On 20 Jul 2016, at 8:51 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>>> 
>>> What version of Camel do you use? You may need to upgrade.
>>> 
>>> On Tue, Jul 19, 2016 at 11:58 PM, Minh Tran <darth.minhster@gmail.com>
wrote:
>>>> Hi
>>>> 
>>>> In a spring DSL, I used to be able to set a shutdown timeout by creating
a ShutdownStrategy bean and setting the appropriate properties and it would work.
>>>> 
>>>> Now when I attempt the same thing in Spring Boot, the bean seems to be ignored.
Any suggestions on the proper way of setting the shutdown timeout in Spring Boot?
>>>> 
>>>> I see this page https://github.com/things8/zed/issues/83 <https://github.com/things8/zed/issues/83>
 It refers to a property called camel.context.shutdown-strategy.timeout but it seems to have
no effect.
>>>> 
>>>> Thanks in advance.
>>> 
>>> 
>>> 
>>> --
>>> Claus Ibsen
>>> -----------------
>>> http://davsclaus.com @davsclaus
>>> Camel in Action 2: https://www.manning.com/ibsen2
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2


Mime
View raw message