I'm using akka-http with a connection pool. When it comes to shutdown, it
seems that I have 3 layers to shutdown. I looked through the 2.0-M1 docs
and googled but did not find an answer.
What's the right way to do that?
Here's what I have in some code right now. http is my
Http().newHostConnectionPoolTls(...).
printResponses andThen {
case _ =>
rows.close // domain specific
http.shutdownAllConnectionPools() andThen {
case _ =>
materializer.shutdown
system.shutdown
system.awaitTermination
DirectoryServices.shutdown() // domain specific
}
}
I have the following objects that can be shutdown:
- akka actors (akka)
- materializer (akka-stream)
- connection pool (akka-http)
- other services - not dependent on akka :-) but maybe I need to keep
open in case a HTTP request is made I do not know about?
Thoughts?
I am getting some errors when I shutdown this way:
[ERROR] [11/26/2015 15:09:37.909] [default-akka.actor.default-dispatcher-8]
[ActorSystem(default)] Outgoing request stream error
(akka.stream.AbruptTerminationE
xception)
[ERROR] [11/26/2015 15:09:37.914]
[default-akka.actor.default-dispatcher-11] [ActorSystem(default)] Outgoing
request stream error (akka.stream.AbruptTermination
Exception)
[ERROR] [11/26/2015 15:09:37.915]
[default-akka.actor.default-dispatcher-12] [ActorSystem(default)] Outgoing
request stream error (akka.stream.AbruptTermination
Exception)
[ERROR] [11/26/2015 15:09:37.920] [default-akka.actor.default-dispatcher-8]
[ActorSystem(default)] Outgoing request stream error
(akka.stream.AbruptTerminationE
xception)
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.