I implement two features A and B. B depends on A.
I call environment.monitor.subscribe(ApplicationStopping) to do shutdown task in the feature install function respectively.
But the shutdown order is A → B, not B → A because ktor call addLast(registration) in ApplicationEvents.subscribe()
Does anyone has workaround?