-
Notifications
You must be signed in to change notification settings - Fork 41.1k
/shutdown and spring integration orderly shutdown #5144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See also #4657 |
Also I should ask, how to properly shutdown spring-integration even without /shutdown endpoint? i.e. just from plain SIGTERM. Out of the box the container shutting down asap, not allowing any in-process handlers to complete. So any beans used by processing method are already destroyed when it completes (transactions cannot commit, jpa unit already closed etc). For now I solved this problem by declaring custom
The key part is But I wonder if this is correct approach? Maybe when Spring destroys I was very surprised that official spring-integration documentation has no any words about graceful shutdown the message flow (with the exception of the JMX). Isn't it the first question, that each developer asks himself when trying to use spring-integration for his needs? This question is maybe offtopic for this issue, but maybe it makes you wonder about things that may have been overlooked otherwise. |
One way to control shutdown order is via a "depends-on" declaration when defining the bean. Another way may be to use parent/child ApplicationContexts. More docs/guidance here would be appreciated. |
The current implementation of the /shutdown endpoint does not delegate to SI's orderly shutdown mechanism when available.
Thanks!
The text was updated successfully, but these errors were encountered: