मैं कोशिश कर रहा हूँ करने के लिए भेजने के सैकड़ों से http अनुरोध अक्का अभिनेता हालांकि मैं हो रही हूँ
akka.stream.BufferOverflowException: Exceeded configured max-open-requests value of [16]. This means that the request queue of this pool (HostConnectionPoolSetup(places.api.here.com,443,ConnectionPoolSetup(ConnectionPoolSettings(16,1,5,16,1,Duration.Inf,100 milliseconds,2 minutes,30 seconds,ClientConnectionSettings(Some(User-Agent: akka-http/10.2.0)...
इस आवेदन.conf
http {
host-connection-pool {
max-connections = 16
min-connections = 1
max-open-requests = 16
}
}
इस कोड
override def receive: Receive = {
case Foo(_) =>
val res: Future[HttpResponse] = Http().singleRequest(HttpRequest(uri = "http://..."))
// do something for the result
मैं नियंत्रण करने की कोशिश की राज्य द्वारा ई । जी
override def receive: Receive = run(0)
def run(openRequests: Int) : Receive = {
case Foo(_) if openRequests <= 16 =>
context.become(run(openRequests + 1))
val responseFuture: Future[HttpResponse] = Http().singleRequest(HttpRequest(uri = "http://..."))
responseFuture.foreach(context.become(run(openRequests - 1)))
//...
या तो जिस तरह से मैं एक ही अपवाद के BufferOverflowException
किसी भी सलाह काफी सराहना की जाएगी