Hi all, I have some simple application based on akka streams and http:
My Flow items: val resultSink = Sink.head[String] val fl0 = Flow[String].map(_.toInt) val fl2 = Flow[Int].map{ case value => Thread.sleep(10000) value.toString } val fl3 = Flow[String].mapAsync(1)(callMe) Part of my akka-http route: val route = get { path("test") { path("register") { parameter('username) { case username: Username => Source.single(username).via(fl0).via(fl2).via(fl3).runWith(resultSink): Future[String] } } } I want to use one flow : Source.single(username). via(fl0).via(fl2).via(fl3).runWith(resultSink) for processing all requests. I want this for use streams back-pressure. But I can't figure out how create Source that can accept values like call def proccess(username: String): Future[String] but with back-pressure, because, for example, a want long-call DB in fl2 step, and DB can't accept more than 1 request per time (only for example) With best regards, Vladimir. -- >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.