Hi All,
I am having some seemingly trivial problems with using the client side of
akka-http. Here is a little test program. I would expect it to print 100
responses, but it prints just four and then hangs.
This seems to be related to the configuration parameter
"akka.http.host-connection-pool.max-connections", which defaults to 4. So
it seems that resources are not given back to the pool.
Is this a bug, or am I doing something wrong? Note that I am aware that
there are other methods to do multiple requests, such as
cachedHostConnectionPool. But in this case I just want to do something
utterly trivial and non-performance-critical with the minimum of fuss.
Cheers,
Rüdiger
---
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{HttpRequest, Uri}
import akka.stream.ActorMaterializer
object TestClient extends App {
implicit val system = ActorSystem()
implicit val mat = ActorMaterializer()
implicit val ec = system.dispatcher
for(i ← 0 until 100)
Http(system).singleRequest(HttpRequest(uri =
Uri("http://www.google.com"))).foreach(println)
}
--
>>>>>>>>>> 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.