You can complete such futures with a Throwable or an actual result, that's what I meant, in another thread you can future.get() (blocking) and as soon as the actor executes the other thread will be able to proceed, I know that's half actor half blocking but that's one of the hassle when dealing with legacy code.
On Thursday, June 30, 2016 at 9:17:35 PM UTC+1, Guido Medina wrote: > > That depends on the supervisor strategy, funny thing that for one my > clients with lots of legacy code I had to use a CompletableFuture because > the framework I'm introducing there has no of ask or await. > And that's an idea you can use, send a Java's CompletableFuture to your > actor, and in such future set either the exception or result and let the > consumer of such failure deal with it: > > > https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html > > HTH, > > Guido. > > On Thursday, June 30, 2016 at 2:52:06 PM UTC+1, kraythe wrote: >> >> Thanks for all the feedback. To be clear you seem to think my second >> approach is the better of the two ideas and I souls just create a bunch of >> these in a router? My only concern there is that if a single actor fails >> requests can queue up in that actors mailbox. When the router restarts the >> failed actor, will unprocessed messages in the mailbox be lost or will it >> go processing as normal? > > -- >>>>>>>>>> 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.
