I’m not too knowledgeable about Ktor and it’s `fea...
# spring
s
I’m not too knowledgeable about Ktor and it’s `feature`s, but you can achieve similar thing to this class in Spring. One approach is to use create it as a
Component
, and hook into destroy events or create destroy handlers to close. Another is to use a
CommandLineRunner
instead of a Component. This also has the benefit of being invoked after the context is initialized. Here’s an example for a Reactive Kafka consumer and can used this way.