I am facing an issue where my spring integration project is trying to sftp something, but when the PaaS needs to restart my container, I need to stop everything, do some cleanup tasks quickly and let it dies.
So I would need to already-executing pub-sub async channel thread to stop immediately (the sftp task) so it won't cause racing condition with the SmartLifeCycle's stop(). I wonder if there is anyway I can achieve this?
Thanks!