[
https://issues.apache.org/jira/browse/CAMEL-19359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724893#comment-17724893
]
Claus Ibsen commented on CAMEL-19359:
-------------------------------------
Okay I have changed the shutdown order in camel-spring so its done a bit later,
this allows SB tomcat http server to shutdown first
{code}
2023-05-22T13:17:16.168+02:00 INFO 39155 --- [ionShutdownHook]
o.s.b.w.e.tomcat.GracefulShutdown : Commencing graceful shutdown.
Waiting for active requests to complete
2023-05-22T13:17:16.960+02:00 INFO 39155 --- [tomcat-shutdown]
o.s.b.w.e.tomcat.GracefulShutdown : Graceful shutdown complete
2023-05-22T13:17:17.954+02:00 INFO 39155 --- [ionShutdownHook]
o.a.c.c.s.CamelHttpTransportServlet : Destroyed
CamelHttpTransportServlet[CamelServlet]
2023-05-22T13:17:18.446+02:00 INFO 39155 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 4.0.0-SNAPSHOT
(TestCamelSaga) is shutting down (timeout:20s)
2023-05-22T13:17:21.295+02:00 INFO 39155 --- [ionShutdownHook]
o.a.c.i.engine.DefaultShutdownStrategy : Starting to graceful shutdown 13
routes (timeout 20 seconds)
...
2023-05-22T13:17:21.318+02:00 INFO 39155 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Stopped route1
(rest-api:///api-doc)
2023-05-22T13:17:21.318+02:00 INFO 39155 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Stopped route2
(direct://databases)
2023-05-22T13:17:21.321+02:00 INFO 39155 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 4.0.0-SNAPSHOT
(TestCamelSaga) shutdown in 2s874ms (uptime:33s)
{code}
> camel-spring-boot - When camel start graceful shutdown, it still receive new
> request during graceful shutdown.
> --------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-19359
> URL: https://issues.apache.org/jira/browse/CAMEL-19359
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.20.4
> Environment: I use the DefaultShutdownStrategy.
> < the module is camel-base-engine 3.20.4 >
> Reporter: adam chen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.0-RC1, 4.0
>
> Attachments: 2023-05-16 10 24 30.jpg, 2023-05-16 10 26 23.jpg,
> 2023-05-16 10 27 58.jpg, 2023-05-16 15 13 59.jpg
>
> Original Estimate: 120h
> Remaining Estimate: 120h
>
> < camel graceful shutdown time = 20s, the service thread.sleep = 10s >
> In my test case, at first I started the application, send the first request
> and then stop the JVM to run the camel graceful shutdown, in the console show
> that there have 2 infilght messages pending to complete, after about 4 sec, I
> send the second request, in theroy, camel shouldn't accept the second
> request, unfortunately, it still receive new request.
> [TestCode|https://github.com/chen19980/GracefulShutdown-test]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)