I have Kafka Streams application, using Spring Boot, which have multiple streams. I want to close all streams (because I don't want to leak consumers), using the destroy method for spring boot. For now I could see that the bean disposal is done sequentially, but I have limit of 10 seconds till the platform call SIGKILL, after SIGTERM was initially called. How would I do asynchronous bean disposal. Keep in mind that there aren't any dependecies or concurency issues would occur. Also the close operation has timeout as it would wait if there is some operation to finish its work. Thanks in advance!
#Async bean disposal
18 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @dry spire! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
ping
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
you could attempt to close them in multiple threads
Can ypu show what you have tried with @Async?
The problem is closing taking too long, right?
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use/help ping.
Warning: abusing this will result in moderative actions taken against you.
The problem is that I have 60 seconds to close all the Kafka Streams within the application. In every stream app I do Completable Future with the topics and their streams to close. But there are multiple Applications with different streams in them. I wanted to close all the stream apps async. That is why on every destroy method I put async, then in bean configuration I put @EnableAsync, after that it seems that it doesnt close them asynchronous.
I want to close all the stream apps withing 10 seconds shere each stream app takes up to 8 seconds to close.
The close is IO operation
This means that they are waiting for some operation to give output.