Hi all,
Been trying to resolve an issue with AbruptTerminationException in
Akka-Http 1.0RC4.
I am PUTing a file after downloading it. The below code runs in an actor
and when the uploadResponse is received, I PoisonPill the actor. Whether I
PoisonPill immediately or with a delay, I receive an
AbruptTerminationException.
Do I need to manually close the stream somehow?
Http()(context.system).singleRequest(HttpRequest(uri =
source)).flatMap(downloadResponse
=> {
downloadResponse.entity match {
case e: UniversalEntity => {
val headers = List(RawHeader("systemid", systemId), RawHeader(
"correlationid", correlationId), RawHeader("checksum", checksum))
Http()(context.system).singleRequest(HttpRequest(method =
HttpMethods.PUT, uri = destination, entity = e, headers =
headers)).map(uploadResponse
=> {
context.system.scheduler.scheduleOnce(FiniteDuration(15,
"second"), self, PoisonPill)
//self ! PoisonPill
"Done"
})
}
case o => Promise.failed(new RuntimeException(s"FAILURE:
${o.toString}")).future
}
})
Thanks,
IR
--
>>>>>>>>>> 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.