hello,
you can try to set the shutdown properties in the context, trying different
combinations as described in the page you linked, for example:

context.setShutdownStrategy(new DefaultShutdownStrategy());
context.getShutdownStrategy().setTimeUnit(TimeUnit.MINUTES);
context.getShutdownStrategy().setTimeout(60);
context.setShutdownRoute(ShutdownRoute.Defer);
context.setShutdownRunningTask(ShutdownRunningTask.CompleteAllTasks);


hope this help

regards,
Marco

Il giorno mar 10 gen 2023 alle ore 08:38 Gaurav Kumar <
kumargaura...@gmail.com> ha scritto:

> Hi Team
> I am using camel version 3.14.4 and trying to implement clean shutdown. As
> per the link below
> https://camel.apache.org/manual/graceful-shutdown.html , I can implement
> Graceful shutdown by implementing  DefaultShutdownStrategy.
> I have added it in configuration and can see that bean has been created but
> when I shutdown the VM then I can see in the logs that
> SimpleMainShutdownStrategy  and DefaultMainShutdown Strategy is getting
> called instead of  DefaultShutdownStrategy.
>
> Can you please let me know what could be the issue or any alternative to
> implement graceful shutdown. Basically I want to process all the in-flight
> messages (in camel VM queues) before shutting down the VM.
>
> --
> Regards
> Gaurav
>

Reply via email to