Could it be that since you define an implicit Materializer in your actor
which is tied to the implicit ActorRefFactory (which would be context
inside the actor), it is the one used for singleRequest which requires an
implicit Materializer? Can you try defining your Materializer as
ActorMaterializer()(context.system) and see if it changes the outcome?
​


Le lun. 14 mars 2016 à 18:36, Sam Smoot <[email protected]> a écrit :

> So if you look at the example in the docs:
> http://doc.akka.io/docs/akka/2.4.2/scala/http/client-side/request-level.html#Using_the_Future-Based_API_in_Actors
>
> That works fine. Except it's incomplete since it's obviously a single-use
> Actor (the request is fired off in preStart) and it doesn't show how to
> clean it up.
>
> I'm trying to implement this in my project, but sending context.self !
> PoisonPill to my Actor after consuming the response will reliably cause an
> AbruptTerminationException.
>
> I've whipped up a gist here that hopefully demonstrates the issue (with
> lots of comments): https://gist.github.com/sam/7731f883a62b329c6592
>
> Any help? I got a suggestion it might have something to do with the
> connection pool, but I'm not sure how to handle that. Should I pass the
> pool into my actor's constructor? Where do I get the pool? How do I pass it
> to singleRequest, which appears to take a ConnectionPoolSettings object?
>
> Thanks, -Sam
>
> --
> >>>>>>>>>> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to