Re: [akka-user][deprecated] Akka backoff supervision for HTTP retries

2018-11-06 Thread Tim Moore
This is also built into Akka: https://doc.akka.io/api/akka/current/akka/pattern/RetrySupport.html On Tue, Nov 6, 2018 at 10:38 PM Chetan Mehrotra wrote: > > If your current implementation is Future-based, then this sounds like a > job for Future.recoverWith: try defining a Future-returning

Re: [akka-user][deprecated] Akka backoff supervision for HTTP retries

2018-11-06 Thread Brian Maso
Nice! +1 On Tue, Nov 6, 2018 at 4:08 AM Chetan Mehrotra wrote: > > If your current implementation is Future-based, then this sounds like a > job for Future.recoverWith: try defining a Future-returning function that > recursively calls itself in Future.recoverWith. > > You can use the approach

Re: [akka-user][deprecated] Akka backoff supervision for HTTP retries

2018-11-06 Thread Chetan Mehrotra
> If your current implementation is Future-based, then this sounds like a job for Future.recoverWith: try defining a Future-returning function that recursively calls itself in Future.recoverWith. You can use the approach from https://gist.github.com/viktorklang/9414163 which works well. There is

Re: [akka-user][deprecated] Akka backoff supervision for HTTP retries

2018-11-05 Thread Brian Maso
I'm sure there are a tons of ways of doing exponential back-off. If your current implementation is Future-based, then this sounds like a job for Future.recoverWith: try defining a Future-returning function that recursively calls itself in Future.recoverWith. And if you are using Akka Streams for

[akka-user][deprecated] Akka backoff supervision for HTTP retries

2018-11-05 Thread mandeep gandhi
Hi all, My use case is that I want to make external calls from an actor( on receiving a type of message). If the HTTP call fails, I want to retry exponentially. My current code uses scalaj.http to HTTP calls. How to achieve it? Can Akka's Backoff supervisor strategy be used for the same (or is