Hi Chris,
I think the feature you're after is described in the ticket:
https://github.com/akka/akka/issues/17732
https://github.com/akka/akka/issues/17346

Also see here for an in depth response about this issue:
https://github.com/akka/akka/issues/17816

On Thu, Jun 4, 2015 at 2:47 PM, Chris Baxter <cbax...@gmail.com> wrote:

> I know in Spray that had a request-timeout setting that could be used to
> control when to timeout a request that has sent the request but has yet to
> receive a response within a specified timeframe.  I don't see this setting
> anywhere in Akka Http.  For a single request, I can handle this by adding
> takeWithin to my stream processing like so:
>
>   val poolClientFlow = Http().cachedHostConnectionPool[Int]("localhost",
> 9200)
>   val responseFuture: Future[(Try[HttpResponse], Int)] =
>     Source.single(HttpRequest(uri = "/foo/bar/16") -> 42)
>       .via(poolClientFlow)
>       .takeWithin(5 seconds)
>       .runWith(Sink.head)
>
>
> In this case, the Future would be failed with a NoSuchElementException
> which I suppose I can interpret to mean the timeout occurred.  Is there a
> better way to do this?  What happens to the underlying connection from the
> pool in this case?  If it was really and truly hung (as opposed to just
> being a little late with the response) I would want it closed.  Is this
> kind of stuff possible?
>
> --
> >>>>>>>>>> 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.
>



-- 
Cheers,
Konrad 'ktoso' Malawski
Akka <http://akka.io/> @ Typesafe <http://typesafe.com/>

-- 
>>>>>>>>>>      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.

Reply via email to